All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] only set scheduler timer for non-idle CPU
@ 2009-03-31  3:14 Yu, Ke
  2009-04-01 14:02 ` Tian, Kevin
  2009-04-02 12:48 ` Thomas Pfeuffer
  0 siblings, 2 replies; 6+ messages in thread
From: Yu, Ke @ 2009-03-31  3:14 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Tian, Kevin, xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

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@intel.com>
                Tian Kevin <kevin.tian@intel.com>

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 #2: sched.patch --]
[-- Type: application/octet-stream, Size: 750 bytes --]

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@intel.com>
                Tian Kevin <kevin.tian@intel.com>

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 #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-03  1:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31  3:14 [PATCH] only set scheduler timer for non-idle CPU Yu, Ke
2009-04-01 14:02 ` Tian, Kevin
2009-04-02 12:48 ` Thomas Pfeuffer
2009-04-02 13:06   ` Keir Fraser
2009-04-02 13:18     ` Keir Fraser
2009-04-03  1:32       ` Yu, Ke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.