[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] sched: fix race between sched_move_domain() and vcpu_wake()

On 11/10/13 13:20, Jan Beulich wrote:
On 11.10.13 at 11:32, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
I suppose you scanned the code for other cases like this, and
there are none?
Actually I did just now, and I think there's a similar issue in
credit2's init_pcpu(): After taking pcpu_schedule_lock(cpu) it
alters schedule_lock and hence effectively drops the locking,
yet continues to do other stuff before in fact releasing it.

What is being done prior to unlocking, however, looks to be
unrelated to the lock being held, and rather independently
(of the effective releasing) wanting &rqd->lock held.

I can't quite make out what you mean in the last sentence; but setting the cpu in rqd->idle and rqd->active should certainly be protected by rqd->lock, and it certainly looks like it's not being grabbed at the moment.

Hmm -- I think we may need to do some kind of fancy looping thing like we do in vcpu_migrate, to lock both the current schedule lock and rqd->lock; with the difference, I suppose, that rqd lock won't change (since the assignment of cpu->runqueue at the moment is static).

Let me put this on my list of things to do before the release.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.