WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH2/6] cpuidle: reduce redundant cost in cstate_restore_

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH2/6] cpuidle: reduce redundant cost in cstate_restore_tsc for nonstop tsc
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Thu, 17 Jun 2010 15:37:47 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Thu, 17 Jun 2010 00:41:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsN7/sFkkuAQiqGTG+QHbDX/LHpdQ==
Thread-topic: [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
Description: 2-cpuidle-fix-cstate_restore_tsc.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH2/6] cpuidle: reduce redundant cost in cstate_restore_tsc for nonstop tsc, Wei, Gang <=