lkml.org 
[lkml]   [2007]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/11] Sched clock paravirt op
Zachary Amsden wrote:
>
> #include "mach_timer.h"
>
> @@ -102,9 +103,6 @@ unsigned long long sched_clock(void)
> {
> unsigned long long this_offset;
>
> - if (unlikely(custom_sched_clock))
> - return (*custom_sched_clock)();
> -
> /*
> * Fall back to jiffies if there's no TSC available:
> */
> @@ -113,13 +111,13 @@ unsigned long long sched_clock(void)
> return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
>
> /* read the Time Stamp Counter: */
> - rdtscll(this_offset);
> + get_scheduled_cycles(this_offset);
>
> /* return the value in ns */
> return cycles_2_ns(this_offset);
> }
>

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>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-06 05:03    [W:0.248 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site