[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH2/6] cpuidle: reduce redundant cost in cstate_restore_tsc for nonstop tsc
cpuidle: reduce redundant cost in cstate_restore_tsc for nonstop tsc Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx> diff -r a73188d7fadc xen/arch/x86/time.c --- a/xen/arch/x86/time.c Sun Jun 13 06:47:31 2010 +0800 +++ b/xen/arch/x86/time.c Sun Jun 13 06:53:45 2010 +0800 @@ -664,13 +664,16 @@ static void __init init_platform_timer(v void cstate_restore_tsc(void) { - struct cpu_time *t = &this_cpu(cpu_time); - struct time_scale sys_to_tsc = scale_reciprocal(t->tsc_scale); + struct cpu_time *t; + struct time_scale sys_to_tsc; s_time_t stime_delta; u64 new_tsc; if ( boot_cpu_has(X86_FEATURE_NONSTOP_TSC) ) return; + + t = &this_cpu(cpu_time); + sys_to_tsc = scale_reciprocal(t->tsc_scale); stime_delta = read_platform_stime() - t->stime_master_stamp; if ( stime_delta < 0 ) Attachment:
2-cpuidle-fix-cstate_restore_tsc.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |