Bug 72051 - Failed to correctly detect device numa_node information on AMD systems
Summary: Failed to correctly detect device numa_node information on AMD systems
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: drivers_pci@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 01:23 UTC by Suravee Suthikulpanit
Modified: 2014-06-03 23:49 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.14-rc4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Dump from SRAT table (36.13 KB, text/plain)
2014-03-14 01:24 UTC, Suravee Suthikulpanit
Details
Dump from SLIT table (1.88 KB, text/plain)
2014-03-14 01:25 UTC, Suravee Suthikulpanit
Details
Dump from DSDT table (384.75 KB, text/plain)
2014-03-14 01:25 UTC, Suravee Suthikulpanit
Details

Description Suravee Suthikulpanit 2014-03-14 01:23:51 UTC
This bug affects AMD family 12h and newer.

The device numa_node information in the sysfs for each PCI device (e.g.
/devices/pci0000:50/0000:50:00.2/numa_node) is showing value -1.

In file arch/x86/pci/acpi.c, in function pci_acpi_scan_root(), it is
queries the node information as following:

#ifdef CONFIG_ACPI_NUMA
      pxm = acpi_get_pxm(device->handle);
      if (pxm >= 0)
          node = pxm_to_node(pxm);
      if (node != -1)
          set_mp_bus_to_node(busnum, node);
      else
#endif
          node = get_mp_bus_to_node(busnum);

In this case, I see that the acpi_get_pxm() returns -1.  Therefore, it
falls back to using the node information in mp_bus_to_node[].  For AMD systems, the arch/x86/pci/amd_bus.c only probe the hostbridge for family10h and 11h, and showing the correct numa_node information.  For the newer systems, it does not fill the mp_bus_to_node[], and result in the value -1.

Please refer to the following email thread for more information:
http://marc.info/?l=linux-kernel&m=139405365524526&w=2
Comment 1 Suravee Suthikulpanit 2014-03-14 01:24:59 UTC
Created attachment 129331 [details]
Dump from SRAT table
Comment 2 Suravee Suthikulpanit 2014-03-14 01:25:18 UTC
Created attachment 129341 [details]
Dump from SLIT table
Comment 3 Suravee Suthikulpanit 2014-03-14 01:25:44 UTC
Created attachment 129351 [details]
Dump from DSDT table
Comment 4 Bjorn Helgaas 2014-06-03 23:49:59 UTC
Resolved by

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94d4bb5b13978127d12860bc6b7071a784144e2f

which will appear in v3.16-rc1.

Note You need to log in before you can comment on or make changes to this bug.