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

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

To: "Yu, Ke" <ke.yu@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] only set scheduler timer for non-idle CPU
From: Thomas Pfeuffer <thomas.pfeuffer@xxxxxxxx>
Date: Thu, 02 Apr 2009 14:48:28 +0200
Cc:
Delivery-date: Thu, 02 Apr 2009 05:49:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D05DB80B95B23498C72C700BD6C2E0B12AB4586@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <4D05DB80B95B23498C72C700BD6C2E0B12AB4586@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050603 Fedora/1.7.8-1.1.1.legacy
Hello Ke,
It is not necessary to set scheduler timer for idle CPU. so this patch add conditional check for idle CPU.
  
I think your patch is not good in case sedf-scheduler is used. If idle VCPU is the current "running" VCPU, the scheduler timer is set to the next "period begin" of the first VCPU in the wait queue.
Your patch prevents sedf from taking the VCPUs waiting for their next period into the runnable queue again.

Best regards,

Thomas

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) )
     {
  

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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>