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

RE: [PATCH v4 05/10] xen/domain: Add DOMCTL handler for claiming memory with NUMA awareness


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bernhard Kaindl <bernhard.kaindl@xxxxxxxxxx>
  • Date: Thu, 16 Apr 2026 23:48:38 +0000
  • Accept-language: en-GB, en-US
  • 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=BV97ZyoIliXkR1/EiuiCiASjWioXeXJYUap5tXGwMPA=; b=JTHRw3ERPPx0JQOWmexxePDDZsjR/DXhzDOH9h2udR7srAtgDDcXOGnNgBoxmTrftrNTlGBxoA+hFG3Q1qMzwfzajH8Sn3ZsZaNiTDstX5oJ6vBjN6lPZo4bI/El+XRO2TSsBnJcdskYNQsxXiZ/hXhMpC+2R2qMaMGlj1u6/B9CIZHYdH2Js0d0P29MflaL6H0VO3lWEmujyJJSsFAUf9BsUR8u5Ghz6JnbUd0v+ChLEXLIEqV7vKLubYVAJGVb8QX+ecM7fbVtij1DrqvDvztrglgDDHqtcjKHqglAzwN7+jIhfawPpR8fS0wmzD7vtjz0j0iiuJj8KRpv72fcZw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o1Ztp8WSKDUK9XnxzC/YNJlTEccLtorgKqh3sRBiO3NHk3G69xG7gWvRxwnIp1oPpobCjIxKtFjUG4g77ngLUrFnY05mgNKDBuh1fbhKF0KVbUwOtJamnkgZNAKGahvSEJfpdiUCnEQjFBmmeE7F7b2mlSrcKf6xolUpauyR6WQI5+Yuvf/9pgGhfBkiP9C6qvBRQA+mMPBT240s9anbQK1PHZFNACxThPcUsSAjN+qsaMxyUES5RNFTKbRXb5FHW3VmUDOjoD74dUiMkZEJJAOEf5isuqctgEGThaFJgQe4fbi283//Hdy2WpYdG/ZaI4dOrakcJvSHZabmne4sWw==
  • 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: Andrew Cooper <andrew.cooper@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 16 Apr 2026 23:49:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcpy8NKyz6wh/Wrk6CsdW/rK3ShrWf2LiAgAAdICCAQZUugIABBMnw
  • Thread-topic: [PATCH v4 05/10] xen/domain: Add DOMCTL handler for claiming memory with NUMA awareness

Hello Jan,

I only reply here to acknowledge your comment. This code is obsolete now:

It is historical with v6 now, where we have new code and different 
considerations
that would be off topic for this discussion on the obsolete v4 series (the 
single-
node interface doesn't exist in v6, the new implementation is multi-node)

> >> +    if ( claim.node == XEN_DOMCTL_CLAIM_MEMORY_NO_NODE )
> >>> +        claim.node = NUMA_NO_NODE;
> >>
> >> What about the incoming claim.node being NUMA_NO_NODE? Imo the range 
> >> checking
> >> the previous patch adds to domain_set_outstanding_pages() wants to move 
> >> here,
> >> at which point the function's new parameter could be properly nodeid_t.
> >
> > nodeid_t and NUMA_NO_NODE have (judging by the existing implementation) are 
> > not
> > exposed in the public API to the control domain.
> >
> > This separation is probably a good thing because it allows to change Xen 
> > internals
> > like nodeit_t and NUMA_NO_NODE if so desired without changing the public 
> > API.
> >
> > NUMA_NO_NODE is defined as 0xFF and nodeid_t is u8. But that is just an
> > implementation detail of the Hypervisor itself. If needed, we could change
> > the implementation like this series could do, if wanted.
> 
> You spell it all out here, but then you don't draw the conclusion that I was 
> aiming
> at: If someone passes in 0xff, that _should not_ be mistaken for 
> NUMA_NO_NODE. Hence
> for the time being you simply need to reject 0xff if you don't want to expose 
> "no
> specific node" exactly that way in the ABI. And indeed ...

Ah, I misunderstood your comment, acknowledged.

Earlier reviews asked for node checking in domain_set_outstanding_pages(), which
should, as you suggested have been moved there. But that's historical with v6 
now,
where we have new code and different considerations.

    cu, Bernhard

PS: I submitted the current design document to reason the design, and v6 itself:
https://bernhard-xen.readthedocs.io/en/claim-sets-v2-design/designs/claims
https://lists.xenproject.org/archives/html/xen-devel/2026-04/msg00587.html

 


Rackspace

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