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] [day] [month] [year] [list]
Date:	Fri, 24 Jul 2009 13:11:11 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Zhaolei <zhaolei@...fujitsu.com>, kosaki.motohiro@...fujitsu.com,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Anton Blanchard <anton@...ba.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 3/4] ftrace: add tracepoint for hrtimer

On Fri, 2009-07-24 at 17:40 +0800, Xiao Guangrong wrote:
> 
> Peter Zijlstra wrote:
> > On Thu, 2009-07-23 at 18:01 +0800, Xiao Guangrong wrote:
> >> Peter Zijlstra wrote:
> >>
> >>> OK, so what you want to measure is the time of the actual callback
> >>> happening (hrtimer_entry) vs that where you would have expected it to
> >>> happen (hrtimer_start + delay), right?
> >>>
> >> Yes
> >>
> >>> So what's wrong with printing the expected expiration time in the
> >>> hrtimer_start tracepoint in the cheap clock units?
> >>>
> >> Is "cheap clock units" means jiffies time?
> > 
> > Nah, something like cpu_clock() which is monotonic per-cpu and should
> > have high resolution where available.
> > 
> 
> Hi Peter,
> 
> Thanks for your valuable suggestion.
> 
> I have do some test for it, and it very suitable for CLOCK_MONOTONIC clock,
> but if the hrtimer's clock is CLOCK_REALTIME, however xtime is needed to get
> the real time.

If you also log xtime shifts in cpu_clock() units you're good again :-)

You could of course also choose to ignore xtime shifts (they're rarely
significant on the scale of timer intervals).
--
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