Re: [PATCH 2/11] Sched clock paravirt op

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Zachary Amsden
Date: Tuesday, February 6, 2007 - 3:47 pm

Andi Kleen wrote:

I missed a title / signed-off on this guy.


Internally, sched_clock runs in units of nanoseconds, not CPU cycles.  
This was wrong in my previous patch.  Fix it so everyone can use the 
same cycles_2_ns code in tsc.c.

Signed-off-by: Zachary Amsden <zach@vmware.com>


Not a new hook; I just changed the name.


It depends.  Scheduled clock must be in units of available time - stolen 
time is not always evenly distributed.  If you make rdtsc just be 
scheduled clock, that almost works.  But most places that use rdtsc 
expect it to be in cycles of approximate real time, and to leap forward 
if something like SMM comes along and steals time.

Not that this is pretty.  Arguably, the TSC should just run at a fixed 
rate, not progress during stolen time.  This idealized TSC assumption is 
not however how Linux is making use of the TSC today.  TSC is more like 
real time, only in a VM, it can't quite keep up with real time, so it 
gets simulated.

Scheduled (or available) time and real time are good notions.  Stolen 
time is debatable.  But TSC is basically just always wrong.  That's why 
I don't want to overload the rdtsc operation.

Zach
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/11] Sched clock paravirt op, Zachary Amsden, (Mon Feb 5, 8:52 pm)
Re: [PATCH 2/11] Sched clock paravirt op, Zachary Amsden, (Mon Feb 5, 9:00 pm)
Re: [PATCH 2/11] Sched clock paravirt op, Andi Kleen, (Tue Feb 6, 5:32 am)
Re: [PATCH 2/11] Sched clock paravirt op, Zachary Amsden, (Tue Feb 6, 3:47 pm)
Re: [PATCH 2/11] Sched clock paravirt op, Jeremy Fitzhardinge, (Tue Feb 6, 4:23 pm)
Re: [PATCH 2/11] Sched clock paravirt op, Zachary Amsden, (Tue Feb 6, 4:42 pm)
Re: [PATCH 2/11] Sched clock paravirt op, Jeremy Fitzhardinge, (Tue Feb 6, 4:48 pm)
Re: [PATCH 2/11] Sched clock paravirt op, Zachary Amsden, (Tue Feb 6, 4:50 pm)