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:	Fri, 12 Nov 2010 12:08:52 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Linus Walleij <linus.walleij@...ricsson.com>
cc:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>,
	john stultz <johnstul@...ibm.com>,
	Rabin VINCENT <rabin.vincent@...ricsson.com>,
	Nicolas Pitre <nico@...xnic.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Colin Cross <ccross@...gle.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] RFC: nomadik: expand timesource to 63 bits

On Fri, 12 Nov 2010, Linus Walleij wrote:

> Thomas Gleixner wrote:
> > On Fri, 12 Nov 2010, Linus Walleij wrote:
> >> Uwe Kleine-König wrote:
> >>
> >>> Instead of implementing sched_clock for each architecture seperatly,
> >>> wouldn't it be nice to have a generic sched_clock that uses the
> >>> architecture's clocksource?  I tried to implement that some time ago,
> >>> but tglx shoot it down because of locking problems.
> >> I was and still am a big fan of this approach, I am willing to help
> >> testing it if you want to dust off this patch set...
> > 
> > sched_clock is not necessarily the same as the current clocksource.
> 
> IIRC Uwe:s approach was that if and only if you would want to use
> the clocksource for sched_clock() you provide a special flag on
> the clocksource, and it will be attempted to be used for sched_clock().

I still don't like the special flag approach. It's mixing
concepts. clock->read() != sched_clock().

I can understand that you want to reuse the conversion factors etc in
struct clocksource, but we have to be more clever than special flags
and magic functions to install sched_clock.

I could accept a solution where we have generic infrastructure which
uses clock->read() and does the magic 63 bit expansion and you'd
simply do sched_clock_install(struct clocksource *) to explicitely
assign that clocksource as sched_clock. No magic, straight forward and
simple.

> Incidentally the dual use of a single free-running timer as both
> single clocksource and sched_clock() baseline seem to creep up in
> a lot of embedded platforms...

No argument about that.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ