lkml.org 
[lkml]   [2019]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: Warn about host bridge device when its numa node is NO_NODE
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

\
 
 \ /
  Last update: 2019-10-25 14:53    [W:0.099 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site