]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Allow numa_node override via sysfs
authorPrarit Bhargava <prarit@redhat.com>
Thu, 23 Oct 2014 18:22:12 +0000 (14:22 -0400)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 6 Nov 2014 22:10:06 +0000 (15:10 -0700)
commitd4aa930aed2d50a89eeb633e10edeaf277f760a7
tree677204f229cd7ad3dcf072d8d7eb44ce01018e9e
parentcf707b7b48540e4559958bc7587fb506b5c80cc1
PCI: Allow numa_node override via sysfs

NUMA systems with ACPI normally describe the physical topology via _PXM
methods.  But many BIOSes don't implement _PXM, which leaves the kernel
with no way to discover the device topology, which reduces performance
because we can't put memory and processes close to the device.

The NUMA node of a PCI device is already exported in the sysfs "numa_node"
file.  Make that file writable so users can workaround the lack of _PXM
methods in the BIOS.  For example:

  echo 3 > /sys/devices/pci0000:ff/0000:03:1f.3/numa_node

sets the node for PCI device 0000:03:1f.3.

Writing the file emits a FW_BUG warning to encourage users to request
firmware updates.  It also taints the kernel with TAINT_FIRMWARE_WORKAROUND
because overriding the node incorrectly can cause performance issues.

[bhelgaas: changelog, documentation text]
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Myron Stowe <mstowe@redhat.com>
CC: Alexander Ducyk <alexander.h.duyck@redhat.com>
CC: Jiang Liu <jiang.liu@linux.intel.com>
Documentation/ABI/testing/sysfs-bus-pci
drivers/pci/pci-sysfs.c