[lkml]   [2007]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 17/17] Add a sched_clock paravirt_op
On Monday 02 April 2007 08:47, Jeremy Fitzhardinge wrote:
> Andi Kleen wrote:
> > I think it would be much cleaner if you didn't implement your own sched_clock,
> > but you adjust ns_base/last_tsc to account for your lost cycles.
> > This could be done cleanly by adding a new function to sched-clock.c
> > Possibly such a function could be used by other parts of the kernel
> > in the future too.
> >
> Cleaner how? This seems pretty to me. Xen can return a
> clock measuring unstolen nanoseconds,

Do you also get a clock for stolen nanoseconds?

> which maps directly to the
> sched_clock interface, doesn't need any of the existing sched_clock
> code. I suppose I could map the Xen interface onto some abstract
> "cycles" notion and hook it into the tsc machinery, but it seems like it
> would be a forced fit. In general, my approach has been to choose the
> higher-level interface over a lower-level one, all other things being equal.

No need for cycles, you could just subtract the stolen ns if you
can get those.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-04-02 08:55    [W:0.051 / U:37.340 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site