All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Bernhard Kaindl <bernhard.kaindl@citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Teddy Astie <teddy.astie@vates.tech>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Michal Orzel <michal.orzel@amd.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Tamas K Lengyel <tamas@tklengyel.com>,
	Alejandro Vallejo <alejandro.garciavallejo@amd.com>,
	Marcus Granado <marcus.granado@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xen/mm: avoid watchdog timeout in dump_numa() on large domains
Date: Tue, 2 Jun 2026 15:09:27 +0200	[thread overview]
Message-ID: <ah7WB--KZY80t67A@macbook.local> (raw)
In-Reply-To: <4f3f6ead-b917-4824-bc24-47a37f921bf6@suse.com>

On Tue, Jun 02, 2026 at 01:51:13PM +0200, Jan Beulich wrote:
> On 02.06.2026 10:49, Bernhard Kaindl wrote:
> > Using the 'u' debug key invokes dump_numa(), which walks each domain's
> > page list under page_alloc_lock to compute per-NUMA-node counts. On
> > domains with many pages, this O(pages) operation can hold the lock long
> > enough to trigger a watchdog timeout.
> 
> In addition to what Roger said: Is it really the lock holding that's a
> problem here? That is, there would be no problem if there was no lock
> involved in this O(pages) operation?
> 
> > Replace the page-list walk with node_tot_pages[], a per-node counter
> > maintained in struct domain. This reduces dump_numa()'s per-domain work
> > from O(pages) to O(nodes).
> 
> Alternative approch for consideration: Purge dump_numa()? This big a
> change for making a keyhandler work better is somewhat questionable an
> approach, imo. The keyhandler isn't there for use in production anyway,
> it's (primarily) a debugging aid. If the data is still needed (and may
> e.g. be useful on production systems), make a (preemptible) domctl or
> sysctl or alike instead?

At some point a similar change will be needed for per-node memory
claims.  While we might refuse just for dump_numa(), the intrusive
changes in memory_exchange() are a requirement for per-node claims
IIRC.

Thanks, Roger.


  reply	other threads:[~2026-06-02 13:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02  8:49 [PATCH] xen/mm: avoid watchdog timeout in dump_numa() on large domains Bernhard Kaindl
2026-06-02 11:40 ` Roger Pau Monné
2026-06-02 11:51 ` Jan Beulich
2026-06-02 13:09   ` Roger Pau Monné [this message]
2026-06-02 13:22   ` Andrew Cooper
2026-06-02 14:09     ` Bernhard Kaindl
2026-06-02 13:21 ` Andrew Cooper

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=ah7WB--KZY80t67A@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=alejandro.garciavallejo@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bernhard.kaindl@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=marcus.granado@citrix.com \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.com \
    --cc=teddy.astie@vates.tech \
    --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.