[PATCH V2] pci, add sysfs numa_node write function
Prarit Bhargava <prarit <at> redhat.com>
2014-10-23 18:20:54 GMT
Some new drivers, such as the Intel QAT driver, drivers/crypto/qat,
require that a specific node be assigned to the device in order to
achieve maximum performance for the device, and will fail to load if the
device has NUMA_NO_NODE. Users can in some cases, with additional
information provided by vendor support, determine what the correct numa
node is supposed to be. In the cases a quick hack of the driver results
in a function QAT device.
In theory, it should be possible to map a PCI device to a PCI root bridge
to a specific node, however, in practice it is not possible. Nodes may
have multiple PCI root bridges, may share multiple PCI root bridges, or
may not have an active root bridge assigned. Hardware manufacturers may
specifically have designed systems without numa node to PCI root bridge
mappings. Without assistance from some hardware reporting mechanism
(SMBIOS, ACPI, etc.) there is no reliable way to determine the numa node
for a PCI bridge or device. Typically this numa mapping is done via the
ACPI _PXM values in the ACPI tables, however, there are many systems out
there that do not populate the ACPI _PXM entries and therefore do not have
correct PCI device numa_node values.
Hardware vendors are accepting of reported bugs for the ACPI _PXM entries,
but production fixes are typically seen in 6 months to a year and in
some past cases, never.
This patch introduces a mechanism to allow a user that knows the correct
value of the numa node to set it via sysfs. As suggested by Alexander
and Bjorn, the setting of the value issues a loud FW_BUG message and
TAINTS notify the user that the issue really is a firmware bug.
To use this, one can do