[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/mm: avoid watchdog timeout in dump_numa() on large domains
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 2 Jun 2026 15:09:27 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wOyHAdNRnSbAKIrq+mXowVimhqtVHKNabqwahNEHcXY=; b=MAynxGMurrP8elLgbTMFS/5YkeXOD39U8bVZIl/gOiNnc6PryKUaLvenf3k4xgZjFFglInY1GgdjuckJ/r8wAYUC/cmuVxKywE82jNkFqNsp3kG7Pfe76cQBfYpB302VYgrTTU6DgW7qhCHs77DGiExE1USzOuTYc757iWYA4yFNZCKeL8UJVvMQrmo4ijpSGdBoLNbp5sWAECfAWAm7dYnxCcsOiDGXcZglkhTd6k8+PoziNIQjx0UeAgiP1fXpu7h3DmyJhIBUejlNubTGuCiGxl6L8o3cnW3gLSUlqCFWMNBgPtF8s9pyI+r9B4V35dJqvWKQbnEvghmGzOsABQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mDnLcOxadTY/HHl7WRJvPFd3VCgSAkJUGxkx8eJLDfyqG9NptbojLxz10X+JRjFti33/NKTpEk0LJf1mNrOuIoQruIwWwynKDQf2Zz54/NOYg/Tz/GQmyWIMReP9M7OzMQlJTFkwaZULdM738/kZhLVLA2c0Wj6OtyE44HrdWb4runbEHYf2gZiwm/DN81Pehs34xLTCHAaj0OdtpULgEzQCKH3CYQMRaL6Sc2pT807lU4EdiSePLS7fnPLZBHKWCyDYq8Y/DnDD2PBPgyojNEQsQMxMGW2E+CoX0h5uHB7a4gK591Ucl3XBMzd186FYg6CY+V6foQ62DCA0kD+fmw==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Bernhard Kaindl <bernhard.kaindl@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Marcus Granado <marcus.granado@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 02 Jun 2026 13:09:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
|