Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
From: Pavel Machek
Date: Tue Aug 15 2006 - 14:56:23 EST
> > > > > Would not preempt_disable fix that?
> > > >
> > > > Partially, but you still have other problems. Please just get rid
> > > > of it. Why do we have timer code in the kernel if you then chose
> > > > not to use it?
> > >
> > > The problem is that gettimeofday() is not always fast.
> > When it is not fast that means it is not reliable and then you're
> > also not well off using it anyways.
> I assume you wanted to say "When gettimeofday() is slow, it means TSC is
> not reliable", which I agree with.
> 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.
do gettimeofday(); gettimeofday(); gettimeofday();, then compare the
result with gettimeofday(); inb(); gettimeofday(); ?
Thanks for all the (sleeping) penguins.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/