From: Bjorn Helgaas <helgaas@kernel.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Yunsheng Lin <linyunsheng@huawei.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
mhocko@kernel.org, peterz@infradead.org, geert@linux-m68k.org,
gregkh@linuxfoundation.org, paul.burton@mips.com
Subject: Re: [PATCH] PCI: Warn about host bridge device when its numa node is NO_NODE
Date: Fri, 25 Oct 2019 07:51:47 -0500 [thread overview]
Message-ID: <20191025125147.GA124662@google.com> (raw)
In-Reply-To: <a33e01bd-3054-a2c4-c206-f893e7373e65@arm.com>
On Thu, Oct 24, 2019 at 11:16:41AM +0100, Robin Murphy wrote:
> On 2019-10-23 6:10 pm, Bjorn Helgaas wrote:
> > PCI: Warn if no host bridge NUMA node info
> > In pci_call_probe(), we try to run driver probe functions on the node where
> > the device is attached. If we don't know which node the device is attached
> > to, the driver will likely run on the wrong node. This will still work,
> > but performance will not be as good as it could be.
>
> Is it guaranteed to be purely a performance issue? In other words, is there
> definitely no way a physical node could be disabled via idle/hotplug/etc.
> such that unattributed devices can silently disappear while still in use?
I think so. At least, if it's more than a performance issue, I have
no idea what sort of problem might happen or how to deal with it.
> > @@ -897,6 +897,9 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
> > else
> > pr_info("PCI host bridge to bus %s\n", name);
> > + if (nr_node_ids > 1 && pcibus_to_node(bus) == NUMA_NO_NODE)
> > + dev_warn(&bus->dev, "Unknown NUMA node; performance will be reduced\n");
>
> I think this still deserves the FW_BUG prefix.
Putting the warning here in pci_register_host_bridge() is convenient
for now but doesn't seem like the ideal place.
I'd rather have the warning at the point where we get the node number,
e.g., in pci_acpi_root_get_node() or of_node_to_nid(), where we would
know what's actually required by spec and we could point to the
specific ACPI device or DT device node that's broken. Then I think
we'd have a better case for using FW_BUG.
I'm a little hesitant to use FW_BUG here in pci_register_host_bridge()
because we don't know where the node number was supposed to come from,
so we can't reliably determine that the lack of one is a bug.
Bjorn
prev parent reply other threads:[~2019-10-25 12:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-19 6:45 [PATCH] PCI: Warn about host bridge device when its numa node is NO_NODE Yunsheng Lin
2019-10-19 8:34 ` Christoph Hellwig
2019-10-21 4:05 ` Yunsheng Lin
2019-10-22 13:55 ` Robin Murphy
2019-10-23 8:24 ` Yunsheng Lin
2019-10-22 21:04 ` Bjorn Helgaas
2019-10-23 8:22 ` Yunsheng Lin
2019-10-23 17:10 ` Bjorn Helgaas
2019-10-24 9:20 ` Michal Hocko
2019-10-24 17:40 ` Bjorn Helgaas
2019-10-25 8:16 ` Michal Hocko
2019-10-25 8:51 ` Yunsheng Lin
2019-10-24 9:39 ` Yunsheng Lin
2019-10-24 10:16 ` Robin Murphy
2019-10-25 12:51 ` Bjorn Helgaas [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=20191025125147.GA124662@google.com \
--to=helgaas@kernel.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=mhocko@kernel.org \
--cc=paul.burton@mips.com \
--cc=peterz@infradead.org \
--cc=robin.murphy@arm.com \
/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.