public inbox for linux-hyperv@vger.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu@kernel.org>
To: Long Li <longli@microsoft.com>
Cc: "K . Y . Srinivasan" <kys@microsoft.com>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"Wei Liu" <wei.liu@kernel.org>,
	"Dexuan Cui" <decui@microsoft.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Rob Herring" <robh@kernel.org>,
	"Michael Kelley" <mikelley@microsoft.com>,
	linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] PCI: hv: Set default NUMA node to 0 for devices without affinity info
Date: Wed, 25 Mar 2026 17:37:01 +0000	[thread overview]
Message-ID: <20260325173701.GA2061088@liuwe-devbox-debian-v2.local> (raw)
In-Reply-To: <20260320051741.GA761114@liuwe-devbox-debian-v2.local>

On Fri, Mar 20, 2026 at 05:17:41AM +0000, Wei Liu wrote:
> On Mon, Mar 16, 2026 at 02:07:42PM -0700, Long Li wrote:
> > When hv_pci_assign_numa_node() processes a device that does not have
> > HV_PCI_DEVICE_FLAG_NUMA_AFFINITY set or has an out-of-range
> > virtual_numa_node, the device NUMA node is left unset. On x86_64,
> > the uninitialized default happens to be 0, but on ARM64 it is
> > NUMA_NO_NODE (-1).
> > 
> > Tests show that when no NUMA information is available from the Hyper-V
> > host, devices perform best when assigned to node 0. With NUMA_NO_NODE
> > the kernel may spread work across NUMA nodes, which degrades
> > performance on Hyper-V, particularly for high-throughput devices like
> > MANA.
> > 
> > Always set the device NUMA node to 0 before the conditional NUMA
> > affinity check, so that devices get a performant default when the host
> > provides no NUMA information, and behavior is consistent on both
> > x86_64 and ARM64.
> > 
> > Fixes: 999dd956d838 ("PCI: hv: Add support for protocol 1.3 and support PCI_BUS_RELATIONS2")
> > Signed-off-by: Long Li <longli@microsoft.com>
> 
> I can pick this up next week. PCI maintainers, if you want this to go
> through your tree instead, please let me know.

Applied to hyperv-fixes.

      reply	other threads:[~2026-03-25 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 21:07 [PATCH v2] PCI: hv: Set default NUMA node to 0 for devices without affinity info Long Li
2026-03-17  1:32 ` Michael Kelley
2026-03-20  5:17 ` Wei Liu
2026-03-25 17:37   ` Wei Liu [this message]

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=20260325173701.GA2061088@liuwe-devbox-debian-v2.local \
    --to=wei.liu@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kwilczynski@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox