lkml.org 
[lkml]   [2008]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: set_cyc2ns_scale() remove tsc_now and ns_now
On Fri, Apr 11, 2008 at 09:55:54AM +0200, Ingo Molnar wrote:
>
> * Andi Kleen <andi@firstfloor.org> wrote:
>
> > (actually it is still the wrong time -- really needs a grace period
> > during which the TSC is not used
> > ftp://firstfloor.org/pub/ak/quilt/patches/sched-clock implemented some
> > of these ideas against an older kernel)
>
> recent CPUs have constant-freq TSCs so it's mostly a legacy issue, but

Actually there millions of non constant freq TSC CPUs shipped each
quarter ...

> we dont really have to worry about complications like grace periods -
> higher layers in the scheduler protect against temporary sched_clock()
> outliers.

But you still get scheduling hickups even with the sanity check. If the
scheduler depends on a smooth time that is not good and my (admittedly much less
than yours) understanding of CFS is that it relies on that. Especially ondemand
can cause quite a lot of cpufreq changes on some workloads.

> So i think this can all be done much simpler. Just get rid of
> the global cpu_khz notion, sched_clock() should simply follow the ->freq
> value - and that's it.

At some point you have to generate an offset to something and that
offset must be different for different frequencies, otherwise
you get large systematic errors

(<imagine complicated mathematical proof why this is so, but it should
be fairly obvious>)

-Andi



\
 
 \ /
  Last update: 2008-04-11 10:05    [W:0.041 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site