Repository navigation
Conversation
xenbus_ring_host_node() answered page_to_nid() of the ring's placeholder page for every HVM mapping. That is the host node of the foreign frame only when xen_mfn_to_node() resolved it at map time and the placeholders were relocated to match; nothing recorded whether it had, so the documented NUMA_NO_NODE fallback never happened. Wherever the lookup fails, in a driver domain, on a hypervisor without XENMEM_get_mfn_pxms, under an XSM policy that refuses it, or on a kernel without CONFIG_XEN_BACKEND_NUMA_AFFINITY, the placeholders come from the pool of whichever CPU xenwatch ran on, so every ring reported that one node, and netback and blkback hard-pinned every guest's queue kthreads and event-channel IRQs onto that node's CPUs. Record the resolved node on the mapping, NUMA_NO_NODE when Xen did not say, and have xenbus_ring_host_node() look it up there, as its header comment already promised. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
kaniini
requested review from
antoineco,
azenla,
bleggett,
sveith and
tycho
as code owners
November 13, 2026 22:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xenbus_ring_host_node()answeredpage_to_nid()of the ring's placeholder page for every HVM mapping. That is the foreign frame's host node only whenxen_mfn_to_node()resolved it at map time and the placeholders were relocated to match, and nothing recorded whether it had, so the documentedNUMA_NO_NODEfallback never happened. Wherever the lookup fails (a driver domain, a hypervisor withoutXENMEM_get_mfn_pxms, an XSM refusal,CONFIG_XEN_BACKEND_NUMA_AFFINITY=n) the placeholders come from the pool of whichever CPU xenwatch ran on, every ring reported that one node, and netback and blkback hard-pinned every guest's queue kthreads and event-channel IRQs onto it.The resolved node is now recorded on the mapping,
NUMA_NO_NODEwhen Xen did not say, andxenbus_ring_host_node()looks it up there, as the header comment ininclude/xen/xenbus.halready promised.Build coverage:
linux-kernel-ocix86_64host.config, no warnings. Note that this config has noCONFIG_SMP, soNUMAand with itXEN_BACKEND_NUMA_AFFINITYare off there andxen_mfn_to_node()is the stub; the fix compiles in that shape but the affinity path is dormant in that kernel.xenbus_client.o,grant-table.o, netback'sinterface.oand blkback'sxenbus.oon anx86_64_defconfigbase withNUMA,ACPI_NUMA,ZONE_DEVICE,XEN_UNPOPULATED_ALLOC,XEN_BACKEND_NUMA_AFFINITY, netback and blkback enabled, no warnings. That is the shape in which the change does something.Not runtime-tested; the symptom shows as every backend kthread's
Cpus_allowed_listmatching one node on a host where the query fails.Not changed: the second part of the issue, that the pinned node is derived from a frontend-chosen page and so a guest decides which dom0 vCPUs serve its queues. With this change that is only possible when Xen did resolve the node, which is the feature working as designed. Softening it would mean either a scheduler-side preference the kernel does not offer for kthreads, or a policy on how much one guest may concentrate on a node; that is a design call for a follow-up.
ENG-225