Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 07, 2006 at 02:48:55PM +0200, Vojtech Pavlik wrote:
> On Mon, Aug 07, 2006 at 02:28:45PM +0200, Andi Kleen wrote:
> > On Mon, Aug 07, 2006 at 01:09:31PM +0200, Vojtech Pavlik wrote:
> > > On Mon, Aug 07, 2006 at 10:48:50AM +0200, Andi Kleen wrote:
> > > > On Sun, Aug 06, 2006 at 10:43:44PM -0400, Dmitry Torokhov wrote:
> > > > > On Saturday 05 August 2006 23:16, Andi Kleen wrote:
> > > > > > This whole thing is broken, e.g. on a preemptive kernel when the
> > > > > > code can switch CPUs 
> > > > > > 
> > > > > 
> > > > > 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.

Hmm if that is the only obstacle I can export a "slow gettimeofday" flag.

However it would be some work to implement it for all architectures.

> 
> I assume we could make it work with the monotonic timer instead. 

The monotonic timer is the right thing to use to make you
independent of ntpd, but it's normally not faster or slower than gettimeofday.

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

[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]
  Powered by Linux