search for: this_offset

Displaying 14 results from an estimated 14 matches for "this_offset".

2007 Apr 18
1
[PATCH 2/9] Sched clock paravirt op fix.patch
...86/kernel/tsc.c Fri Feb 16 00:06:34 2007 -0800 @@ -14,6 +14,7 @@ #include <asm/delay.h> #include <asm/tsc.h> #include <asm/io.h> +#include <asm/timer.h> #include "mach_timer.h" @@ -108,9 +109,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: */ @@ -119,7 +117,7 @@ unsigned long long sched_clock(void) return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); /* read the Time Stamp Counter...
2007 Apr 18
1
[PATCH 2/9] Sched clock paravirt op fix.patch
...86/kernel/tsc.c Fri Feb 16 00:06:34 2007 -0800 @@ -14,6 +14,7 @@ #include <asm/delay.h> #include <asm/tsc.h> #include <asm/io.h> +#include <asm/timer.h> #include "mach_timer.h" @@ -108,9 +109,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: */ @@ -119,7 +117,7 @@ unsigned long long sched_clock(void) return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); /* read the Time Stamp Counter...
2007 Apr 18
2
[PATCH/RFC] replace get_scheduled_cycles with sched_clock paravirt_op
...unsigned long long cycles_2_ns(unsigned long long cyc) -{ - return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; -} - /* * Scheduler clock - returns current time in nanosec units. */ -unsigned long long sched_clock(void) +unsigned long long native_sched_clock(void) { unsigned long long this_offset; @@ -110,11 +105,23 @@ unsigned long long sched_clock(void) return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); /* read the Time Stamp Counter: */ - get_scheduled_cycles(this_offset); + rdtscll(this_offset); /* return the value in ns */ return cycles_2_ns(this_offset); } + +/...
2007 Apr 18
2
[PATCH/RFC] replace get_scheduled_cycles with sched_clock paravirt_op
...unsigned long long cycles_2_ns(unsigned long long cyc) -{ - return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; -} - /* * Scheduler clock - returns current time in nanosec units. */ -unsigned long long sched_clock(void) +unsigned long long native_sched_clock(void) { unsigned long long this_offset; @@ -110,11 +105,23 @@ unsigned long long sched_clock(void) return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); /* read the Time Stamp Counter: */ - get_scheduled_cycles(this_offset); + rdtscll(this_offset); /* return the value in ns */ return cycles_2_ns(this_offset); } + +/...
2007 Apr 18
0
[PATCH 3/9] Vmi cpu cycles.patch
....set_ldt = native_set_ldt, .load_gdt = native_load_gdt, diff -r b8b315c897bb arch/i386/kernel/tsc.c --- a/arch/i386/kernel/tsc.c Tue Feb 27 14:04:43 2007 -0800 +++ b/arch/i386/kernel/tsc.c Tue Feb 27 14:09:23 2007 -0800 @@ -117,7 +117,7 @@ unsigned long long sched_clock(void) return cycles_2_ns(this_offset); } -static unsigned long calculate_cpu_khz(void) +unsigned long native_calculate_cpu_khz(void) { unsigned long long start, end; unsigned long count; diff -r b8b315c897bb include/asm-i386/paravirt.h --- a/include/asm-i386/paravirt.h Tue Feb 27 14:04:43 2007 -0800 +++ b/include/asm-i386/para...
2007 Apr 18
0
[PATCH 3/9] Vmi cpu cycles.patch
....set_ldt = native_set_ldt, .load_gdt = native_load_gdt, diff -r b8b315c897bb arch/i386/kernel/tsc.c --- a/arch/i386/kernel/tsc.c Tue Feb 27 14:04:43 2007 -0800 +++ b/arch/i386/kernel/tsc.c Tue Feb 27 14:09:23 2007 -0800 @@ -117,7 +117,7 @@ unsigned long long sched_clock(void) return cycles_2_ns(this_offset); } -static unsigned long calculate_cpu_khz(void) +unsigned long native_calculate_cpu_khz(void) { unsigned long long start, end; unsigned long count; diff -r b8b315c897bb include/asm-i386/paravirt.h --- a/include/asm-i386/paravirt.h Tue Feb 27 14:04:43 2007 -0800 +++ b/include/asm-i386/para...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...le __devinitdata = 0; +int use_sched_clock_cycles; static int use_tsc; /* Number of usecs that the last interrupt was delayed */ static int delay_at_last_interrupt; @@ -116,23 +118,17 @@ static unsigned long long monotonic_cloc */ unsigned long long sched_clock(void) { - unsigned long long this_offset; - /* * In the NUMA case we dont use the TSC as they are not * synchronized across all CPUs. */ #ifndef CONFIG_NUMA - if (!use_tsc) + if (!use_sched_clock_cycles) #endif /* no locking but a rare wrong value is not a big deal */ return jiffies_64 * (1000000000 / HZ); - - /* Read t...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...le __devinitdata = 0; +int use_sched_clock_cycles; static int use_tsc; /* Number of usecs that the last interrupt was delayed */ static int delay_at_last_interrupt; @@ -116,23 +118,17 @@ static unsigned long long monotonic_cloc */ unsigned long long sched_clock(void) { - unsigned long long this_offset; - /* * In the NUMA case we dont use the TSC as they are not * synchronized across all CPUs. */ #ifndef CONFIG_NUMA - if (!use_tsc) + if (!use_sched_clock_cycles) #endif /* no locking but a rare wrong value is not a big deal */ return jiffies_64 * (1000000000 / HZ); - - /* Read t...
2007 Apr 18
0
[RFC, PATCH 22/24] i386 Consolidate redundant timer code
...- cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz; -} - -static inline unsigned long long cycles_2_ns(unsigned long long cyc) -{ - return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; -} - static unsigned long long monotonic_clock_hpet(void) { unsigned long long last_offset, this_offset, base; @@ -155,6 +122,7 @@ static int __init init_hpet(char* overri return -ENODEV; printk("Using HPET for gettimeofday\n"); + init_xtime_from_cmos(); if (cpu_has_tsc) { unsigned long tsc_quotient = calibrate_tsc_hpet(&tsc_hpet_quotient); if (tsc_quotient) { @@ -168,7 +...
2007 Apr 18
0
[RFC, PATCH 22/24] i386 Consolidate redundant timer code
...- cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz; -} - -static inline unsigned long long cycles_2_ns(unsigned long long cyc) -{ - return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; -} - static unsigned long long monotonic_clock_hpet(void) { unsigned long long last_offset, this_offset, base; @@ -155,6 +122,7 @@ static int __init init_hpet(char* overri return -ENODEV; printk("Using HPET for gettimeofday\n"); + init_xtime_from_cmos(); if (cpu_has_tsc) { unsigned long tsc_quotient = calibrate_tsc_hpet(&tsc_hpet_quotient); if (tsc_quotient) { @@ -168,7 +...
2007 Apr 18
0
[PATCH 6/6] VMI timer patches
...ernel/tsc.c Thu Dec 14 16:40:16 2006 -0800 @@ -23,6 +23,7 @@ * an extra value to store the TSC freq */ unsigned int tsc_khz; +unsigned long long (*custom_sched_clock)(void); int tsc_disable __cpuinitdata = 0; @@ -107,6 +108,9 @@ unsigned long long sched_clock(void) { unsigned long long this_offset; + if (unlikely(custom_sched_clock)) + return (*custom_sched_clock)(); + /* * in the NUMA case we dont use the TSC as they are not * synchronized across all CPUs. diff -r 77e4058e936b arch/i386/kernel/vmi.c --- a/arch/i386/kernel/vmi.c Thu Dec 14 16:40:14 2006 -0800 +++ b/arch/i386/kerne...
2007 Apr 18
0
[PATCH 6/6] VMI timer patches
...ernel/tsc.c Thu Dec 14 16:40:16 2006 -0800 @@ -23,6 +23,7 @@ * an extra value to store the TSC freq */ unsigned int tsc_khz; +unsigned long long (*custom_sched_clock)(void); int tsc_disable __cpuinitdata = 0; @@ -107,6 +108,9 @@ unsigned long long sched_clock(void) { unsigned long long this_offset; + if (unlikely(custom_sched_clock)) + return (*custom_sched_clock)(); + /* * in the NUMA case we dont use the TSC as they are not * synchronized across all CPUs. diff -r 77e4058e936b arch/i386/kernel/vmi.c --- a/arch/i386/kernel/vmi.c Thu Dec 14 16:40:14 2006 -0800 +++ b/arch/i386/kerne...
2007 Apr 18
0
[PATCH 5/5] Vmi timer.patch
...ernel/tsc.c Tue Dec 12 13:53:15 2006 -0800 @@ -23,6 +23,7 @@ * an extra value to store the TSC freq */ unsigned int tsc_khz; +unsigned long long (*custom_sched_clock)(void); int tsc_disable __cpuinitdata = 0; @@ -107,6 +108,9 @@ unsigned long long sched_clock(void) { unsigned long long this_offset; + if (unlikely(custom_sched_clock)) + return (*custom_sched_clock)(); + /* * in the NUMA case we dont use the TSC as they are not * synchronized across all CPUs. diff -r d1ec5a6e3e8c arch/i386/kernel/vmi.c --- a/arch/i386/kernel/vmi.c Tue Dec 12 13:53:09 2006 -0800 +++ b/arch/i386/kerne...
2007 Apr 18
0
[PATCH 5/5] Vmi timer.patch
...ernel/tsc.c Tue Dec 12 13:53:15 2006 -0800 @@ -23,6 +23,7 @@ * an extra value to store the TSC freq */ unsigned int tsc_khz; +unsigned long long (*custom_sched_clock)(void); int tsc_disable __cpuinitdata = 0; @@ -107,6 +108,9 @@ unsigned long long sched_clock(void) { unsigned long long this_offset; + if (unlikely(custom_sched_clock)) + return (*custom_sched_clock)(); + /* * in the NUMA case we dont use the TSC as they are not * synchronized across all CPUs. diff -r d1ec5a6e3e8c arch/i386/kernel/vmi.c --- a/arch/i386/kernel/vmi.c Tue Dec 12 13:53:09 2006 -0800 +++ b/arch/i386/kerne...