Bug 844381 - --hint-policy=subset not respected if balance level is higher than CORE
--hint-policy=subset not respected if balance level is higher than CORE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: irqbalance (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Petr Holasek
Evan McNabb
Depends On:
  Show dependency treegraph
Reported: 2012-07-30 08:55 EDT by Paolo Bonzini
Modified: 2016-10-04 00:08 EDT (History)
4 users (show)

See Also:
Fixed In Version: irqbalance-1.0.3-8.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-06-13 07:12:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paolo Bonzini 2012-07-30 08:55:15 EDT
Description of problem:
See http://code.google.com/p/irqbalance/issues/detail?id=37.  This causes irqbalance to fail setting up affinity correctly for multiqueue virtio-scsi devices.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start a virtual machine with QEMU >= 1.2 (will be in Beta 1) and -smp 4 -device virtio-scsi-pci,num_queues=4.
2. Stop irqbalance.
3. Look in /proc/interrupts for the four virtio-request interrupts, assign the affinity hints (/proc/irq/NUM/affinity_hint) respectively to 1 2 4 8.
4. Start irqbalance --oneshot --hint-policy=exact.
5. Look at the affinity that is set in /proc/irq/NUM/smp_affinity. 
Actual results:
No affinity, smp_affinity is "f" for all four interrupts

Expected results:
smp_affinity matches affinity hint.

Additional info:
The same results occur also with --hint-policy=subset (the default).

This is because PCI storage adapters are BALANCE_CACHE and, on a system with one NUMA node and one cache domain, irqbalance finds nothing to do.  The attached patch does two things: 1) it forces the first execution of activate_mappings to consider all interrupts; 2) it forces activate_mapping to do something even for interrupts without assigned objects, if the hint policy is not ignore.

Future kernel patches will make steps 2-3-4 redundant.
Comment 1 Paolo Bonzini 2012-08-07 12:31:07 EDT
Further analysis pointed to two bugs:

- one is general brokenness of irqbalance on non-NUMA machines, and affects both exact and subset hint policies (fixed by commit 1189cd6f)

- the other is specific to affinity hints with --hintpolicy=subset (fixed in commit 638d405beed670b96258171bfe8363fae1569167)
Comment 3 Ludek Smid 2014-06-13 07:12:35 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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