[PATCH v4 0/3] xen/sched: fix cpu hotplug

Juergen Gross posted 3 patches 1 year, 7 months ago
Test gitlab-ci passed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220905070005.16788-1-jgross@suse.com
xen/common/sched/core.c    | 214 ++++++++++++++++++++++++-------------
xen/common/sched/cpupool.c |  92 +++++++++++-----
xen/common/sched/private.h |  21 +++-
xen/include/xen/sched.h    |   9 +-
4 files changed, 236 insertions(+), 100 deletions(-)
[PATCH v4 0/3] xen/sched: fix cpu hotplug
Posted by Juergen Gross 1 year, 7 months ago
A recent change in the hypervisor memory allocation framework led to
crashes when unplugging host cpus.

This was due to the (correct) assertion that allocating and freeing
memory is allowed with enabled interrupts only. As the main cpu unplug
operation is done in stop-machine context, this assertion triggers in
debug builds.

Correct that by pre-allocating all needed memory while interrupts are
still on, and free memory after interrupts are enabled again.

Changes in V4:
- addressed comments

Changes in V3:
- addressed all comments

Changes in V2:
- addressed all comments

Juergen Gross (3):
  xen/sched: introduce cpupool_update_node_affinity()
  xen/sched: carve out memory allocation and freeing from
    schedule_cpu_rm()
  xen/sched: fix cpu hotplug

 xen/common/sched/core.c    | 214 ++++++++++++++++++++++++-------------
 xen/common/sched/cpupool.c |  92 +++++++++++-----
 xen/common/sched/private.h |  21 +++-
 xen/include/xen/sched.h    |   9 +-
 4 files changed, 236 insertions(+), 100 deletions(-)

-- 
2.35.3
Re: [PATCH v4 0/3] xen/sched: fix cpu hotplug
Posted by Jan Beulich 1 year, 7 months ago
On 05.09.2022 09:00, Juergen Gross wrote:
> A recent change in the hypervisor memory allocation framework led to
> crashes when unplugging host cpus.
> 
> This was due to the (correct) assertion that allocating and freeing
> memory is allowed with enabled interrupts only. As the main cpu unplug
> operation is done in stop-machine context, this assertion triggers in
> debug builds.
> 
> Correct that by pre-allocating all needed memory while interrupts are
> still on, and free memory after interrupts are enabled again.
> 
> Changes in V4:
> - addressed comments
> 
> Changes in V3:
> - addressed all comments
> 
> Changes in V2:
> - addressed all comments
> 
> Juergen Gross (3):
>   xen/sched: introduce cpupool_update_node_affinity()
>   xen/sched: carve out memory allocation and freeing from
>     schedule_cpu_rm()
>   xen/sched: fix cpu hotplug
> 
>  xen/common/sched/core.c    | 214 ++++++++++++++++++++++++-------------
>  xen/common/sched/cpupool.c |  92 +++++++++++-----
>  xen/common/sched/private.h |  21 +++-
>  xen/include/xen/sched.h    |   9 +-
>  4 files changed, 236 insertions(+), 100 deletions(-)

I notice you've committed this series, but I wonder why you did so without a
common/sched/ maintainer's ack.

Jan