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]
Date:	Mon, 4 May 2015 13:05:19 -0700
From:	Drew Richardson <drew.richardson@....com>
To:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	John Stultz <john.stultz@...aro.org>,
	Wade Cherry <Wade.Cherry@....com>,
	Pawel Moll <pawel.moll@....com>
Subject: Re: [PATCH] ftrace: Provide trace clock monotonic raw

On Mon, May 04, 2015 at 04:10:05PM +0100, Mathieu Desnoyers wrote:
> ----- Original Message -----
> > Expose the NMI safe accessor to the monotonic raw clock to the
> > tracer. The mono clock was added with commit
> > 1b3e5c0936046e7e023149ddc8946d21c2ea20eb. Although the monotonic raw
> > clock cannot be used to compare time between different machines, it is
> > not perterbed by ntp.
> 
> perterbed -> perturbed

Oops, I'll correct that in the next version.

> > 
> > Signed-off-by: Drew Richardson <drew.richardson@....com>
> >
> 
> What is the use-case that justify exposing the "raw fast"
> clock that cannot be handled by the "monotonic fast" clock ?
> 
> Thanks,
> 
> Mathieu

I'm collecting and merging data from perf, with Android Atrace data
(writes to /sys/kernel/debug/tracing/trace_marker) which ends up in
the ftrace stream and other measurements collected from
userspace. Currently the only clock readable from userspace, supported
by perf and by ftrace is CLOCK_MONOTONIC. However this clock is
affected by the incremental adjustments performed by adjtime(3) and
NTP. But I'd prefer to use a clock that is advancing at a consistent
rate, hence CLOCK_MONOTONIC_RAW.

Thanks,

Drew


> > ---
> >  kernel/trace/trace.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 05330494a0df..458031c31a37 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -876,6 +876,7 @@ static struct {
> >  	{ trace_clock_jiffies,		"uptime",	0 },
> >  	{ trace_clock,			"perf",		1 },
> >  	{ ktime_get_mono_fast_ns,	"mono",		1 },
> > +	{ ktime_get_raw_fast_ns,	"mono_raw",	1 },
> >  	ARCH_TRACE_CLOCKS
> >  };
> >  
> > --
> > 2.1.4
> > 
> > 
> 
> -- 
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com
> 
--
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