[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 35/48] xen/sched: add fall back to idle vcpu when scheduling unit
Hi Juergen, On 8/9/19 3:58 PM, Juergen Gross wrote: When scheduling an unit with multiple vcpus there is no guarantee all vcpus are available (e.g. above maxvcpus or vcpu offline). Fall back to idle vcpu of the current cpu in that case. This requires to store the correct schedule_unit pointer in the idle vcpu as long as it used as fallback vcpu. In order to modify the runstates of the correct vcpus when switching schedule units merge sched_unit_runstate_change() into sched_switch_units() and loop over the affected physical cpus instead of the unit's vcpus. This in turn requires an access function to the current variable of other cpus. Today context_saved() is called in case previous and next vcpus differ when doing a context switch. With an idle vcpu being capable to be a substitute for an offline vcpu this is problematic when switching to an idle scheduling unit. An idle previous vcpu leaves us in doubt which schedule unit was active previously, so save the previous unit pointer in the per-schedule resource area and use its value being non-NULL as a hint whether context_saved() should be called. When running an idle vcpu in a non-idle scheduling unit use a specific guest idle loop not performing any tasklets and livepatching in order to avoid populating the cpu caches with memory used by other domains (as far as possible). Softirqs are considered to be save. In order to avoid livepatching when going to guest idle another variant of reset_stack_and_jump() not calling check_for_livepatch_work is needed. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> I haven't looked at the full patch. The arm change is quite minimal, so for just arm-bits: Acked-by: Julien Grall <julien.grall@xxxxxxx> Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |