Improving the kernel/i386 timecounter performance (GSoC proposal)

Sergey Babkin babkin at
Fri Mar 27 09:27:30 PDT 2009

   (Sorry for the top quoting). Probably the best implementation of
   gettimeofd   a page in the kernel mapped read-only to all the user pr   the kernel's idea of time
   into this page. Then getting the    reads, to make sure that
   no update    The TSC can then be used to add the precis   the kernel timer:
   i.e. remember the value of TS   highest rate at which
   TSC may be ti   would guarantee thatthe time is not moving back.
   However there are more issues with TS   the same value
   on all the processors that s   machine is built of multiple
   buses    stopped, resta   and clocked separately. There is no way to tell, on which CPU is th   process currently
   runnning, and it may be rescheduled do a different C   or after the RDTSC
     In message <[2]17560ccf0903260551v1f5cba9eu8     7727c0bae7baa3 at>, Prasha
     nt Vaibhav writes:
          >change     and use the
     &g     kernel to
          I take it a     functions than gettim     monotonic timescale when queried      Be aware that the TSC may not be, and may not stay syn     across multiple cores.
     Further more, the TSC is not con     not "known frequency" at all times.
     There are a lot of nasty cases to check, and a nasty interpolation
          speedu     At the very minimum, you wi     known good {CPU+MOBO+BIOS} combinatio     find them.
     >This will also pave way f     >FreeBSD kernel tickless,
     Rubbish. T     tick or ticklessnes     > - The TSC frequency might change on cert     non-constant
     > TSC rate (because of SpeedStep,      only way to
     > combat this is that t     processor
     > frequency changes.     updated to
     > notify the     That is not good enough     speed
     and the skew from not k     clock
     changed, is a significant      to make strange things happen.
     You will want to study carefully Dave Mills work to tame the alpha
     [1] In my mind, rewo     be a much better more neded     --
     Poul-Henning Kamp |      [3]phk at FreeBSD.ORG | TCP     FreeBSD committer | BSD since 4.3-tahoe
     N     incompetence.<     [4]freebsd-hackers at mailing list
     unsubscribe, send any mail to "[6]fre     ebsd-hackers-unsubscribe at"


   1. 3D"mailto:phk at"
   2. file://localhost/tmp/3D   3. 3D"mailto:phk at FreeBSD.ORG"
   4. 3D"mailto:fre   5. 3D"http://lists.=/
   6. 3D"mailto:freebsd-hackers-unsub

More information about the freebsd-current mailing list