All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Dario Faggioli <dfaggioli@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: [PATCH v2 0/3] xen/sched: fix cpu hotplug
Date: Mon, 15 Aug 2022 13:04:07 +0200	[thread overview]
Message-ID: <20220815110410.19872-1-jgross@suse.com> (raw)

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 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    | 204 +++++++++++++++++++++++--------------
 xen/common/sched/cpupool.c |  91 ++++++++++++-----
 xen/common/sched/private.h |  21 +++-
 xen/include/xen/sched.h    |   9 +-
 4 files changed, 225 insertions(+), 100 deletions(-)

-- 
2.35.3



             reply	other threads:[~2022-08-15 11:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 11:04 Juergen Gross [this message]
2022-08-15 11:04 ` [PATCH v2 1/3] xen/sched: introduce cpupool_update_node_affinity() Juergen Gross
2022-08-15 11:41   ` Jan Beulich
2022-08-15 11:58     ` Juergen Gross
2022-08-15 12:01       ` Jan Beulich
2022-08-15 11:04 ` [PATCH v2 2/3] xen/sched: carve out memory allocation and freeing from schedule_cpu_rm() Juergen Gross
2022-08-15 11:52   ` Jan Beulich
2022-08-15 11:55     ` Juergen Gross
2022-08-15 12:00       ` Jan Beulich
2022-08-15 12:16         ` Juergen Gross
2022-08-15 12:34           ` Jan Beulich
2022-08-15 12:47             ` Juergen Gross
2022-08-15 14:28               ` Juergen Gross
2022-08-15 11:04 ` [PATCH v2 3/3] xen/sched: fix cpu hotplug Juergen Gross
2022-08-15 12:27   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220815110410.19872-1-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dfaggioli@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.