Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-12 Thread George Dunlap
On 08/10/15 18:23, Andrew Cooper wrote: > On 08/10/15 17:46, George Dunlap wrote: >> On 08/10/15 16:20, Andrew Cooper wrote: >>> On 08/10/15 15:58, George Dunlap wrote: On 29/09/15 18:31, Andrew Cooper wrote: > On 29/09/15 17:55, Dario Faggioli wrote: >> The insert_vcpu() scheduler hoo

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-09 Thread Dario Faggioli
On Fri, 2015-10-09 at 14:05 +0100, Andrew Cooper wrote: > 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, > > > >

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-09 Thread Andrew Cooper
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 def

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-08 Thread Dario Faggioli
On Thu, 2015-10-08 at 18:23 +0100, Andrew Cooper wrote: > On 08/10/15 17:46, George Dunlap wrote: > > On 08/10/15 16:20, Andrew Cooper wrote: > > > There are a lot of codepaths, but I cant see one which is > > > definitely > > > called with interrupts disables. (OTOH, I can see several where > >

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-08 Thread Dario Faggioli
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

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-08 Thread Andrew Cooper
On 08/10/15 17:46, George Dunlap wrote: > On 08/10/15 16:20, Andrew Cooper wrote: >> On 08/10/15 15:58, George Dunlap wrote: >>> On 29/09/15 18:31, Andrew Cooper wrote: On 29/09/15 17:55, Dario Faggioli wrote: > The insert_vcpu() scheduler hook is called with an > inconsistent locking

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-08 Thread George Dunlap
On 08/10/15 16:20, Andrew Cooper wrote: > On 08/10/15 15:58, George Dunlap wrote: >> On 29/09/15 18:31, Andrew Cooper wrote: >>> On 29/09/15 17:55, Dario Faggioli wrote: The insert_vcpu() scheduler hook is called with an inconsistent locking strategy. In fact, it is sometimes invoked

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-08 Thread Andrew Cooper
On 08/10/15 15:58, George Dunlap wrote: > On 29/09/15 18:31, Andrew Cooper wrote: >> On 29/09/15 17:55, Dario Faggioli wrote: >>> The insert_vcpu() scheduler hook is called with an >>> inconsistent locking strategy. In fact, it is sometimes >>> invoked while holding the runqueue lock and sometimes

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-08 Thread George Dunlap
On 29/09/15 18:31, Andrew Cooper wrote: > On 29/09/15 17:55, Dario Faggioli wrote: >> The insert_vcpu() scheduler hook is called with an >> inconsistent locking strategy. In fact, it is sometimes >> invoked while holding the runqueue lock and sometimes >> when that is not the case. >> >> In other w

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-01 Thread Dario Faggioli
On Thu, 2015-10-01 at 02:03 -0600, Jan Beulich wrote: > > > > On 29.09.15 at 18:55, wrote: > > In case of credit1, remove_vcpu() handling needs some > > fixing remove_vcpu() too, i.e.: > > - it manipulates runqueues, so the runqueue lock must > >be acquired; > > Is this really a fix needed o

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-10-01 Thread Jan Beulich
>>> On 29.09.15 at 18:55, wrote: > In case of credit1, remove_vcpu() handling needs some > fixing remove_vcpu() too, i.e.: > - it manipulates runqueues, so the runqueue lock must >be acquired; Is this really a fix needed only as a result of the insert side changes? If not, since the insert s

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-09-30 Thread Andrew Cooper
On 29/09/15 22:40, Dario Faggioli wrote: > On Tue, 2015-09-29 at 18:31 +0100, Andrew Cooper wrote: >> On 29/09/15 17:55, Dario Faggioli wrote: >>> The insert_vcpu() scheduler hook is called with an >>> inconsistent locking strategy. In fact, it is sometimes >>> invoked while holding the runqueue lo

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-09-29 Thread Dario Faggioli
On Tue, 2015-09-29 at 23:40 +0200, Dario Faggioli wrote: > On Tue, 2015-09-29 at 18:31 +0100, Andrew Cooper wrote: > > On 29/09/15 17:55, Dario Faggioli wrote: > > Is the use of _lock_irq() here to cover another issue expecting > > interrupts to be disabled, or could it be replaced with a plain >

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-09-29 Thread Dario Faggioli
On Tue, 2015-09-29 at 18:31 +0100, Andrew Cooper wrote: > On 29/09/15 17:55, Dario Faggioli wrote: > > The insert_vcpu() scheduler hook is called with an > > inconsistent locking strategy. In fact, it is sometimes > > invoked while holding the runqueue lock and sometimes > > when that is not the ca

Re: [Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-09-29 Thread Andrew Cooper
On 29/09/15 17:55, Dario Faggioli wrote: > The insert_vcpu() scheduler hook is called with an > inconsistent locking strategy. In fact, it is sometimes > invoked while holding the runqueue lock and sometimes > when that is not the case. > > In other words, some call sites seems to imply that > lock

[Xen-devel] [PATCH 3/9] xen: sched: make locking for {insert, remove}_vcpu consistent

2015-09-29 Thread Dario Faggioli
The insert_vcpu() scheduler hook is called with an inconsistent locking strategy. In fact, it is sometimes invoked while holding the runqueue lock and sometimes when that is not the case. In other words, some call sites seems to imply that locking should be handled in the callers, in schedule.c --