diff options
Diffstat (limited to 'scripts/system')
-rwxr-xr-x | scripts/system/irq-affinity.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/system/irq-affinity.pl b/scripts/system/irq-affinity.pl index fec90dc3..cf68c0d1 100755 --- a/scripts/system/irq-affinity.pl +++ b/scripts/system/irq-affinity.pl @@ -157,7 +157,11 @@ sub first_cpu { unless defined($ifunit); my $threads = threads_per_core(); - return ( $ifunit * $threads ) % $cpus; + # Give the load first to one CPU of each hyperthreaded core, then + # if there are enough NICs, give the load to the other CPU of + # each core. + my $ht_wrap = (($ifunit * $threads) / $cpus) % $threads; + return ((($ifunit * $threads) + $ht_wrap) % $cpus); } # Assignment for multi-queue NICs |