Re: [PATCH] PCI: sysfs: Suppress FW_BUG warning when NUMA node already matches
From: Krzysztof Wilczyński
Date: Sat Mar 14 2026 - 16:54:23 EST
Hello,
> The numa_node sysfs interface allows users to manually override a PCI
> device's NUMA node assignment. Currently, every write triggers a
> FW_BUG warning and taints the kernel, even when writing the same value
> that is already set.
So, this works as intended, then?
What makes multiple writes to this sysfs attribute, if you don't mind me
asking? Do you have some tool that does this? Some automation?
Especially, that you seem to be writing the same value over and over.
> if (node != NUMA_NO_NODE && !node_online(node))
> return -EINVAL;
>
> - add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
> - pci_alert(pdev, FW_BUG "Overriding NUMA node to %d. Contact your vendor for updates.",
> - node);
> + if (node != dev->numa_node) {
> + add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
> + pci_alert(pdev, FW_BUG "Overriding NUMA node to %d. Contact your vendor for updates.",
> + node);
> + dev->numa_node = node;
> + }
You could invert the check and make it an early return where you just
return count. Would save on the new indent level.
Thank you!
Krzysztof