Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-13 Thread Juergen Gross
On 13.09.19 16:44, Jan Beulich wrote: On 13.09.2019 16:07, Juergen Gross wrote: On 11.09.19 12:30, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -174,6 +174,7 @@ struct vcpu

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-13 Thread Jan Beulich
On 13.09.2019 16:07, Juergen Gross wrote: > On 11.09.19 12:30, Jan Beulich wrote: >> On 09.08.2019 16:58, Juergen Gross wrote: >>> --- a/xen/include/xen/sched.h >>> +++ b/xen/include/xen/sched.h >>> @@ -174,6 +174,7 @@ struct vcpu >>> XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t) compat;

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-13 Thread Juergen Gross
On 12.09.19 12:24, Dario Faggioli wrote: On Fri, 2019-08-09 at 16:58 +0200, Juergen Gross wrote: Today the vcpu runstate of a new scheduled vcpu is always set to "running" even if at that time vcpu_runnable() is already returning false due to a race (e.g. with pausing the vcpu). With core

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-13 Thread Juergen Gross
On 11.09.19 12:30, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -266,7 +266,7 @@ static inline void sched_unit_runstate_change(struct sched_unit *unit, struct vcpu *v = unit->vcpu_list; if ( running ) -

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-12 Thread Dario Faggioli
On Fri, 2019-08-09 at 16:58 +0200, Juergen Gross wrote: > Today the vcpu runstate of a new scheduled vcpu is always set to > "running" even if at that time vcpu_runnable() is already returning > false due to a race (e.g. with pausing the vcpu). > > With core scheduling this can no longer work as

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-12 Thread Dario Faggioli
On Wed, 2019-09-11 at 12:30 +0200, Jan Beulich wrote: > On 09.08.2019 16:58, Juergen Gross wrote: > > > > --- a/xen/include/xen/sched-if.h > > +++ b/xen/include/xen/sched-if.h > > @@ -75,6 +75,20 @@ static inline bool unit_runnable(const struct > > sched_unit *unit) > > return

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-11 Thread Jan Beulich
On 09.08.2019 16:58, Juergen Gross wrote: > --- a/xen/common/schedule.c > +++ b/xen/common/schedule.c > @@ -266,7 +266,7 @@ static inline void sched_unit_runstate_change(struct > sched_unit *unit, > struct vcpu *v = unit->vcpu_list; > > if ( running ) > -