On Tue, Aug 07, 2007 at 06:20:33PM -0700, Yinghai Lu wrote:
> please check this one against pci_scan_bus_with_sysdata
>
> [PATCH 1/5] x86_64: get mp_bus_to_node as early v3
>
> current on amd k8 system with multi ht chain, the numa_node of pci
> devices under r/sys/devices/pci0000:80/* always 0, even that chain is
> on node 1 or 2 or 3.
>
> workaround: pcibus_to_node(bus) is used when we want to get node
> that pci_device is on.
>
> In struct device, we already have numa_node member. and we could use
> dev_to_node() /set_dev_node() to get and set numa_node in the
> device. set_dev_node is called in pci_device_add() with
> pcibus_to_node(bus). and pcibus_to_node use bus->sysdata for nodeid.
>
> the problem is when pci_add_device is called, bus->sysdata is not
> assigned correct nodeid yet. the result will be numa_node always is
> 0.
>
> pcibios_scan_root and pci_scan_root could take sysdata. So we need
> to get mp_bus_to_node mapping before these two are called. and
> get_mp_bus_to_node could get correct node for sysdata in root bus.
>
> in scanning of root bus, all child bus will take parent bus sysdata. So all
> pci_device->dev.numa_node will be assigned correctly automatically.
>
> later we could use dev_to_node(&pci_dev->dev) to get numa_node, and
> we could also could make other bus specific device get the correct
> numa_node too.
>
> this is one update version to pci_sysdata ... also reverse
> pci_acpi_scan_root to use pcibios_scan_root again.
Can you explain why this patch (and your other patches in this area)
are needed? is this a performance issue? the patches seem complex, is
there a good argument for that complexity?
Cheers,
Muli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]