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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1275059312.27810.9600.camel@twins>
Date:	Fri, 28 May 2010 17:08:32 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Johannes Stezenbach <js@...21.net>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jens Axboe <jens.axboe@...cle.com>,
	Divyesh Shah <dpshah@...gle.com>, Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched_clock: Provide local_clock() and improve
 documentation

On Fri, 2010-05-28 at 15:42 +0200, Johannes Stezenbach wrote:
> On Fri, May 28, 2010 at 03:13:34PM +0200, Peter Zijlstra wrote:
> > + * The !IRQ-safetly of sched_clock() and sched_clock_cpu() comes from things
> 
> typo                ^
> 
> Thank you for adding documentation.  I have one additional
> question regarding wrapping of sched_clock().  I know it is
> used for timestamps in ftrace and printk, so it's desirable
> that it never wraps.  But on several embedded systems
> it wraps after a few hours.  Bug or just a minor flaw?
> If someone knows it would be nice to get that documented, too.

The scheduler assumes it wraps at u64, however since we mostly use it to
compute a time deltas it mostly works, even when it wraps sooner, its
just that we get large jumps once in a while when it does wraps, due to
(s64)(new - old) not ending up being a proper s64.

If you have CONFIG_HAVE_UNSTABLE_SCHED_CLOCK, these jumps will be
filtered out and polished over.
--
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