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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
- Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
- Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
- Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
- Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
- Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
- Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
- Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]