On Mon, 2019-09-30 at 07:21 +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 not all vcpus of a > schedule unit have to be "running" when being scheduled. So the > vcpu's > new runstate has to be selected at the same time as the runnability > of > the related schedule unit is probed. > > For this purpose introduce a new helper unit_runnable_state() which > will save the new runstate of all tested vcpus in a new field of the > vcpu struct. > > Signed-off-by: Juergen Gross <jgr...@suse.com> > --- > RFC V2: > - new patch > V3: > - add vcpu loop to unit_runnable_state() right now instead of doing > so in next patch (Jan Beulich, Dario Faggioli) > - make new_state unsigned int (Jan Beulich) > V4: > - add comment explaining unit_runnable_state() (Jan Beulich) > Reviewed-by: Dario Faggioli <dfaggi...@suse.com>
Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <<This happens because _I_ choose it to happen!>> (Raistlin Majere)
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel