Re: gettimeofday order of magnitude slower with pmtimer, which is default

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

 



On Mon, 2006-03-20 at 13:24 +0100, bert hubert wrote:
> Yesterday, together with Zwane, I discovered each gettimeofday call costs me
> 4 usec on some boxes and almost nothing on others. We did a fruitless chase
> for vsyscall/sysenter happening but the problem turned out to be
> CONFIG_X86_PM_TIMER.
> 
> This problem has been discussed before
> http://www.ussg.iu.edu/hypermail/linux/kernel/0411.1/2135.html
> 
> Not only is the pm timer slow by design, it also needs to be read multiple
> times to work around a bug in certain hardware.
> 
> What is new is that this option is now dependent on CONFIG_EMBEDDED. Unless
> you select this option, the PM Timer will always be used.
> 
> Would a patch removing the link to EMBEDDED and adding a warning that while
> this timer is of high quality, it is slow, be welcome?

I think Ogawa's patch is the right solution for dropping the triple
read, which should help a good bit. 

If you *really* are sure the TSC is usable on your system, you can
override it w/ clock=tsc. Warning users that the clock is slow without
giving them a way to know if the TSC is usable will likely just cause
more problem reports. And hey, its better then using the PIT :)

thanks
-john

-
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