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: <1275070953.1645.391.camel@laptop>
Date:	Fri, 28 May 2010 20:22:33 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Chad Talbott <ctalbott@...gle.com>
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 11:11 -0700, Chad Talbott wrote:
> On Fri, May 28, 2010 at 6:13 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> > + * local_clock()      -- is cpu_clock() on the current cpu.
> 
> Pretty sure this should read, "is cpu_clock() on *some* cpu," since
> there is no guarantee in a preemptible kernel that local_clock()
> returns on the same CPU that it was called from. The caller has to do
> the preempt protection itself.

Current cpu simply has no meaning if preemption isn't disabled. If it
is, it has and the result is useful.

Some of the local_clock() users are strictly per-cpu (and clearly have
preemption disabled), for some there simply is no better clock and
simply cope with the small incoherency in time.



--
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