Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Changelog
[xen-unstable] xen, credit2: Put the per-cpu schedule lock back to the default lock when releasing cpu
 

Index | Next | Previous | View Flat


patchbot at xen

Apr 11, 2012, 1:44 PM


Views: 31
Permalink
[xen-unstable] xen, credit2: Put the per-cpu schedule lock back to the default lock when releasing cpu

# HG changeset patch
# User George Dunlap <george.dunlap [at] eu>
# Date 1334050915 -3600
# Node ID b2a467527d68b0b021038a8f714b69974e37ca6c
# Parent 478bec603d3d666a67d1e49e450e553105416407
xen, credit2: Put the per-cpu schedule lock back to the default lock when releasing cpu

This fixes a bug that happens when you remove cpus from a credit2
cpupool.

Signed-off-by: George Dunlap <george.dunlap [at] eu>
Committed-by: Keir Fraser <keir [at] xen>
---


diff -r 478bec603d3d -r b2a467527d68 xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c Tue Apr 10 10:41:30 2012 +0100
+++ b/xen/common/sched_credit2.c Tue Apr 10 10:41:55 2012 +0100
@@ -1952,6 +1952,7 @@ csched_free_pdata(const struct scheduler
unsigned long flags;
struct csched_private *prv = CSCHED_PRIV(ops);
struct csched_runqueue_data *rqd;
+ struct schedule_data *sd = &per_cpu(schedule_data, cpu);
int rqi;

spin_lock_irqsave(&prv->lock, flags);
@@ -1979,6 +1980,11 @@ csched_free_pdata(const struct scheduler
deactivate_runqueue(prv, rqi);
}

+ /* Move spinlock to the original lock. */
+ ASSERT(sd->schedule_lock == &rqd->lock);
+ ASSERT(!spin_is_locked(&sd->_lock));
+ sd->schedule_lock = &sd->_lock;
+
spin_unlock(&rqd->lock);

cpumask_clear_cpu(cpu, &prv->initialized);

_______________________________________________
Xen-changelog mailing list
Xen-changelog [at] lists
http://lists.xensource.com/xen-changelog

Subject User Time
[xen-unstable] xen, credit2: Put the per-cpu schedule lock back to the default lock when releasing cpu patchbot at xen Apr 11, 2012, 1:44 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.