Red Hat Bugzilla – Bug 832815
irqbalance does not honor affinity_hint values from drivers loaded after it starts
Last modified: 2016-10-04 00:08:18 EDT
Created attachment 592442 [details]
Patch the irqbalance.service to start after network.target so network driver affinity_hint values will be honored.
Description of problem: irqbalance should honor affinity_hint values set by various drivers. Since it reads the affinity_hint values only once at startup (unless there's a cpu hotplug event), it is important that irqbalance start after the drivers have been loaded. The irqbalance.service file says "After=syslog.target"; as a result, irqbalance may start before drivers have had a chance to call irq_set_affinity_hint. For network drivers, this problem can be solved by adding After=network.target.
Version-Release number of selected component (if applicable): irqbalance-1.0.3-3.fc16.x86_64
How reproducible: Boot up the system. If irqbalance starts too early, the /proc/irq/*/smp_affinity values will not be consistent with the /proc/irq/*/affinity_hint values.
Steps to Reproduce:
1. Configure the system with a driver that sets affinity_hint values.
2. Reboot the system.
3. Observer that the /proc/irq/*/smp_affinity values may not be consistent with the /proc/irq/*/affinity_hint values.
Actual results: /proc/irq/*/smp_affinity ignores the values in affinity_hint if irqbalance happens to start before the driver.
Expected results: /proc/irq/*/smp_affinity values should be consistent with the affinity_hint values.
Additional info: The attached patch seems to fix the problem for network drivers.
I've escalated this issue upstream:
Could you please test patch posted by Neil?
This patch did not work for me. While this solution seems more elegant in
principle, I think there's a race condition that is causing it to fail. Perhaps the irq is being instantiated and triggering a rescan before the driver gets a chance to set the affinity_hint.
The rescan will have a minimum period of 10 seconds, while the time between registering an irq and settings its affinity hint will be measured in microseconds. So if you're getting a consistent failure of this patch, then I think something else is going on. Can you tell me:
1) What the affinity_hint of the irq in question is
2) What irqbalance sets that irqs smp_affinity to
3) What the irqbalance daemons hintpolicy is
Andrew, any news?
irqbalance-1.0.3-6.fc18 has been submitted as an update for Fedora 18.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing irqbalance-1.0.3-6.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
irqbalance-1.0.3-7.fc18 has been submitted as an update for Fedora 18.
irqbalance-1.0.3-6.fc17 has been submitted as an update for Fedora 17.
irqbalance-1.0.3-8.fc18 has been submitted as an update for Fedora 18.
irqbalance-1.0.3-8.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
irqbalance-1.0.3-6.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.