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: Use vcpu processor explicitly

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] credit2: Use vcpu processor explicitly
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 05:33:31 -0800
Delivery-date: Thu, 23 Dec 2010 05:35:35 -0800
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@xxxxxxx>
# Date 1291978188 0
# Node ID 6687236c4702aa2a7b1b8387e12c51b14d059f15
# Parent  b482e1782ed21f96f585c0fa86c2ef9b9f32ae8a
credit2: Use vcpu processor explicitly

No functional changes.

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

diff -r b482e1782ed2 -r 6687236c4702 xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c        Fri Dec 10 10:49:20 2010 +0000
+++ b/xen/common/sched_credit2.c        Fri Dec 10 10:49:48 2010 +0000
@@ -676,7 +676,6 @@ csched_vcpu_wake(const struct scheduler 
 csched_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
 {
     struct csched_vcpu * const svc = CSCHED_VCPU(vc);
-    const unsigned int cpu = vc->processor;
     s_time_t now = 0;
 
     /* Schedule lock should be held at this point. */
@@ -686,7 +685,7 @@ csched_vcpu_wake(const struct scheduler 
     BUG_ON( is_idle_vcpu(vc) );
 
     /* Make sure svc priority mod happens before runq check */
-    if ( unlikely(per_cpu(schedule_data, cpu).curr == vc) )
+    if ( unlikely(per_cpu(schedule_data, vc->processor).curr == vc) )
     {
         goto out;
     }
@@ -710,8 +709,8 @@ csched_vcpu_wake(const struct scheduler 
     now = NOW();
 
     /* Put the VCPU on the runq */
-    runq_insert(ops, cpu, svc);
-    runq_tickle(ops, cpu, svc, now);
+    runq_insert(ops, vc->processor, svc);
+    runq_tickle(ops, vc->processor, svc, now);
 
 out:
     d2printk("w-\n");
@@ -722,6 +721,7 @@ csched_context_saved(const struct schedu
 csched_context_saved(const struct scheduler *ops, struct vcpu *vc)
 {
     struct csched_vcpu * const svc = CSCHED_VCPU(vc);
+    s_time_t now = NOW();
 
     vcpu_schedule_lock_irq(vc);
 
@@ -738,14 +738,11 @@ csched_context_saved(const struct schedu
      */
     if ( test_bit(__CSFLAG_delayed_runq_add, &svc->flags) )
     {
-        const unsigned int cpu = vc->processor;
-
+        BUG_ON(__vcpu_on_runq(svc));
         clear_bit(__CSFLAG_delayed_runq_add, &svc->flags);
 
-        BUG_ON(__vcpu_on_runq(svc));
-
-        runq_insert(ops, cpu, svc);
-        runq_tickle(ops, cpu, svc, NOW());
+        runq_insert(ops, vc->processor, svc);
+        runq_tickle(ops, vc->processor, svc, now);
     }
 
     vcpu_schedule_unlock_irq(vc);

_______________________________________________
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: Use vcpu processor explicitly, Xen patchbot-unstable <=