[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 46/47] xen/sched: disable scheduling when entering ACPI deep sleep states



On 14.09.2019 10:52, Juergen Gross wrote:
> When entering deep sleep states all domains are paused resulting in
> all cpus only running idle vcpus. This enables us to stop scheduling
> completely in order to avoid synchronization problems with core
> scheduling when individual cpus are offlined.
> 
> Disabling the scheduler is done by replacing the softirq handler
> with a dummy scheduling routine only enabling tasklets to run.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
> V2: new patch
> ---
>  xen/arch/x86/acpi/power.c |  4 ++++

The minimal changes here
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

> +void scheduler_disable(void)
> +{
> +    scheduler_active = false;
> +    open_softirq(SCHEDULE_SOFTIRQ, schedule_dummy);
> +    open_softirq(SCHED_SLAVE_SOFTIRQ, schedule_dummy);
> +}
> +
> +void scheduler_enable(void)
> +{
> +    open_softirq(SCHEDULE_SOFTIRQ, schedule);
> +    open_softirq(SCHED_SLAVE_SOFTIRQ, sched_slave);
> +    scheduler_active = true;
> +}

I have to admit I find the behavior of open_softirq() odd that
you make use of here, i.e. I'm not convinced you should rely on
the function not gaining a check refusing the operation if a
handler is already in place. Otoh I see that even in up-to-date
Linux this works the same.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.