[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060807151957.GA9911@rhlx01.fht-esslingen.de>
Date: Mon, 7 Aug 2006 17:19:57 +0200
From: Andreas Mohr <andi@...x01.fht-esslingen.de>
To: Andi Kleen <ak@....de>
Cc: Vojtech Pavlik <vojtech@...e.cz>,
Dmitry Torokhov <dtor@...ightbb.com>,
Rusty Russell <rusty@...tcorp.com.au>,
lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
On Mon, Aug 07, 2006 at 02:56:39PM +0200, Andi Kleen wrote:
> On Mon, Aug 07, 2006 at 02:48:55PM +0200, Vojtech Pavlik wrote:
> > But I need, in the driver, in the no-TSC case use i/o counting, not a
> > slow but reliable method. And I can't say, from outside the timing
> > subsystem, whether gettimeofday() is fast or slow.
>
> Hmm if that is the only obstacle I can export a "slow gettimeofday" flag.
Wouldn't it be much more useful to normalize this versus (e.g.) CPU cycles
for much more information than a plain "this is fast/this is slow" flag,
to be measured on bootup?
That way a driver could use
if (gtod_cpu_cycles_needed <= 500)
gettimeofday();
else
funky_fast_workaround();
OK, in total we have at least four ways of doing this:
a) gtod_is_slow flag
b) number of CPU cycles needed
c) number of nanoseconds needed (but this is less useful since it doesn't
properly take into account the fast vs. slow CPUs behaviour, I think)
d) providing all three items above together, for optimal flexibility??
This is somewhat related to an idea of mine which would be to benchmark all
clock sources on bootup and print a timing summary, optionally warning
users if grave performance issues have been found with a specific source
(and especially if that one is active!).
Additionally, print timing summary of gettimeofday() itself on bootup?
Andreas Mohr
-
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