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-changelog

[Xen-changelog] [xen-unstable] credit2: Fix tasklets

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] credit2: Fix tasklets
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2010 00:40:21 -0700
Delivery-date: Fri, 14 May 2010 00:43:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1273650430 -3600
# Node ID 94fe56ff92be33eb9dd5181f88fd69f7fc1040b3
# Parent  15e574a858000a721d962a6f3152ab561f11f5c1
credit2: Fix tasklets

Signed-off-by: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
---
 xen/common/sched_credit2.c |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff -r 15e574a85800 -r 94fe56ff92be xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c        Wed May 12 08:43:47 2010 +0100
+++ b/xen/common/sched_credit2.c        Wed May 12 08:47:10 2010 +0100
@@ -921,18 +921,16 @@ csched_schedule(
     /* Update credits */
     burn_credits(rqd, scurr, now);
 
-    /* Tasklet work (which runs in idle VCPU context) overrides all else. */
-    if ( tasklet_work_scheduled )
-    {
-        snext = CSCHED_VCPU(idle_vcpu[cpu]);
-        goto out;
-    }
-
     /*
      * Select next runnable local VCPU (ie top of local runq).
      *
      * If the current vcpu is runnable, and has higher credit than
-     * the next guy on the queue (or there is noone else), we want to run him 
again.
+     * the next guy on the queue (or there is noone else), we want to
+     * run him again.
+     *
+     * If there's tasklet work to do, we want to chose the idle vcpu
+     * for this processor, and mark the current for delayed runqueue
+     * add.
      *
      * If the current vcpu is runnable, and the next guy on the queue
      * has higher credit, we want to mark current for delayed runqueue
@@ -941,7 +939,7 @@ csched_schedule(
      * If the current vcpu is not runnable, we want to chose the idle
      * vcpu for this processor.
      */
-    if ( list_empty(runq) )
+    if ( list_empty(runq) || tasklet_work_scheduled )
         snext = CSCHED_VCPU(idle_vcpu[cpu]);
     else
         snext = __runq_elem(runq->next);
@@ -949,9 +947,10 @@ csched_schedule(
     if ( !is_idle_vcpu(current) && vcpu_runnable(current) )
     {
         /* If the current vcpu is runnable, and has higher credit
-         * than the next on the runqueue, run him again.
+         * than the next on the runqueue, and isn't being preempted
+         * by a tasklet, run him again.
          * Otherwise, set him for delayed runq add. */
-        if ( scurr->credit > snext->credit)
+        if ( !tasklet_work_scheduled && scurr->credit > snext->credit)
             snext = scurr;
         else
             set_bit(__CSFLAG_delayed_runq_add, &scurr->flags);
@@ -998,7 +997,6 @@ csched_schedule(
         snext->vcpu->processor = cpu; /* Safe because lock for old processor 
is held */
     }
 
- out:
     /*
      * Return task to run next...
      */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] credit2: Fix tasklets, Xen patchbot-unstable <=