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/
Home Products Support Community News


[Xen-devel] [PATCH] only set scheduler timer for non-idle CPU

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] only set scheduler timer for non-idle CPU
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Tue, 31 Mar 2009 11:14:02 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 30 Mar 2009 20:15:47 -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: AcmxrrnG2bbT4VfVQ22bjts6i02VlQ==
Thread-topic: [PATCH] only set scheduler timer for non-idle CPU
It is not necessary to set scheduler timer for idle CPU. so this patch add 
conditional check for idle CPU.

This patch remove the last idle periodic timer in xen, thus enhance the idle 
average C state residency from two-digits ms to three-digit ms.

Signed-off-by:  Yu Ke <ke.yu@xxxxxxxxx>
                Tian Kevin <kevin.tian@xxxxxxxxx>

diff -r e4bfa70d587c xen/common/schedule.c
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -819,7 +819,10 @@ static void schedule(void)
     sd->curr = next;
-    set_timer(&sd->s_timer, now + r_time);
+    if ( !is_idle_vcpu(next) )
+    {
+        set_timer(&sd->s_timer, now + r_time);
+    }
     if ( unlikely(prev == next) )

Attachment: sched.patch
Description: sched.patch

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] only set scheduler timer for non-idle CPU, Yu, Ke <=