lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070719172403.GU11657@kernel.dk>
Date:	Thu, 19 Jul 2007 19:24:03 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	stable@...nel.org, Greg KH <greg@...ah.com>,
	Chris Wright <chrisw@...s-sol.org>,
	Srivatsa Vaddagiri <vatsa@...ibm.com>,
	Jan Glauber <jang@...ux.vnet.ibm.com>, Andi Kleen <ak@...e.de>
Subject: Re: [patch] sched: implement cpu_clock(cpu) high-speed time
	source,  take #2

On Thu, Jul 19 2007, Jeremy Fitzhardinge wrote:
> > Index: linux/block/blktrace.c
> > ===================================================================
> > --- linux.orig/block/blktrace.c
> > +++ linux/block/blktrace.c
> > @@ -41,7 +41,7 @@ static void trace_note(struct blk_trace 
> >  		const int cpu = smp_processor_id();
> >  
> >  		t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION;
> > -		t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu);
> > +		t->time = cpu_clock(cpu) - per_cpu(blk_trace_cpu_offset, cpu);
> >  		t->device = bt->dev;
> >  		t->action = action;
> >  		t->pid = pid;
> > @@ -159,7 +159,7 @@ void __blk_add_trace(struct blk_trace *b
> >  
> >  		t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION;
> >  		t->sequence = ++(*sequence);
> > -		t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu);
> > +		t->time = cpu_clock(cpu) - per_cpu(blk_trace_cpu_offset, cpu);
> >   
> 
> What's this measuring here?  Time spend in IO?  Wouldn't it be better
> off with a measurement of real monotonic time?

It's not time spent in IO, it wants a nanosecond timestamp.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ