Bug 1957741

Summary: [irqbalance] -i and -m options do not force irqbalance to avoid IRQ affinity changes
Product: Red Hat Enterprise Linux 9 Reporter: Adrian Tomasov <atomasov>
Component: irqbalanceAssignee: Kairui Song <kasong>
Status: CLOSED NOTABUG QA Contact: Jiri Dluhos <jdluhos>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: aokuliar, atomasov, jeder, jhladky, jshortt, osabart, rvr
Target Milestone: beta   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-04 08:09:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adrian Tomasov 2021-05-06 11:38:20 UTC
Description of problem:
The current release of irqbalance does not allow us to manually specify IRQ affinity
using tuna for specific NIC/module. The IRQs are firstly banned using the -i parameter
followed by the tuna command for manual affinity changes. After a few seconds, the IRQ
affinity is changed by a background task (probably irqbalance). This behavior
causes a performance drop on an AMD Epyc system with 200 Gb NIC.

We also tried the -m parameter to ban all IRQs of a specific module, but the result is the 
same as -i parameter. 

Version-Release number of selected component (if applicable):
irqbalance-1.7.0-5.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1. Install RHEL-9.0.0-20210420.2
2. Install irqbalance and tuna
3. systemctl enable irqbalance
4. reboot
5. for i in $(cat /proc/interrupts | grep mlx5 | cut -f1 -d:); do irqbalance -i $i; done
6. tuna --irqs mlx5*  --cpus 0-47 --spread
7. watch -n 0.2 tuna --irqs mlx5* -Q

Actual results:
Specific IRQs are distributed by irqbalance.

Expected results:
Specific IRQs are not distributed by irqbalance after IRQ affinity modification by tuna.

Additional info:

Comment 1 Adam Okuliar 2021-06-04 08:09:51 UTC
Sorry we misunderstood irqbalance manual page. Irqbalance command line options have to be passed via systemd at the boot time. 
Correct way to do this is via /usr/lib/irqbalance/defaults.env which is processed by systemd at the boot time.

IGNORED="mlx5_core"
ARGS=""
for i in $(cat /proc/interrupts | grep $IGNORED | cut -f1 -d:); do ARGS="$ARGS -i $i"; done
echo IRQBALANCE_ARGS=\"$ARGS\" > /usr/lib/irqbalance/defaults.env 

alternatively

IGNORED="mlx5"
echo IRQBALANCE_ARGS=\" -m $IGNORED\" > /usr/lib/irqbalance/defaults.env 

closing as NOTABUG.