[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent
On 08/10/15 21:39, Dario Faggioli wrote: > On Thu, 2015-10-08 at 16:20 +0100, Andrew Cooper wrote: >> On 08/10/15 15:58, George Dunlap wrote: >>> Generic scheduling code is called from interrupt contexts -- >>> namely, >>> vcpu_wake() >> There are a lot of codepaths, but I cant see one which is definitely >> called with interrupts disables. (OTOH, I can see several where >> interrupts are definitely enabled). >> > Sorry, it's certainly me, but I don't think I understand this. > > AFAICT, you are saying that you fail to find in the code, situations > the scheduler code is invoked, with interrupts already disabled, is > this correct? In particular "definitely called with interrupt disabled" > is what confuses me... :-/ Given a brief look at the code, I can't spot a codepath where it is obvious that interrupts are disabled. > > Also (assuming what I just said is what you meant), are you referring > "just" to schedule(), or even to other scheduler's code, which also > disables interrupt when taking the lock(s) it needs, like, e.g., > vcpu_wake() as George said? I was looking on callchains involving vcpu_wake(). > >>> , which for the credit scheduler wants to put things on the >>> runqueue. Lock taken in interrupt context => interrupts must be >>> disabled whenever taking the lock, yes? >> Correct, which is the purpose of the ASSERT()s in the _irq() and >> _irqsave() variants. >> > What ASSERT()? I don't find any assert in _spin_lock_irqsave() (which > thing makes sense to me): Ah yes - _irqsave() wouldn't want an assertion. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |