net: mana: Assigning IRQ affinity on HT cores
authorSouradeep Chakrabarti <schakrabarti@linux.microsoft.com>
Mon, 29 Jan 2024 06:21:07 +0000 (22:21 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 1 Feb 2024 12:06:40 +0000 (13:06 +0100)
commit8afefc361209b726aa5886833384d048412b159e
tree79a26332da7b6d3e0be461a15fe7316f84ec7c55
parent91bfe210e196780667c94c2795103ca6013233fc
net: mana: Assigning IRQ affinity on HT cores

Existing MANA design assigns IRQ to every CPU, including sibling
hyper-threads. This may cause multiple IRQs to be active simultaneously
in the same core and may reduce the network performance.

Improve the performance by assigning IRQ to non sibling CPUs in local
NUMA node. The performance improvement we are getting using ntttcp with
following patch is around 15 percent against existing design and
approximately 11 percent, when trying to assign one IRQ in each core
across NUMA nodes, if enough cores are present.
The change will improve the performance for the system
with high number of CPU, where number of CPUs in a node is more than
64 CPUs. Nodes with 64 CPUs or less than 64 CPUs will not be affected
by this change.

The performance study was done using ntttcp tool in Azure.
The node had 2 nodes with 32 cores each, total 128 vCPU and number of channels
were 32 for 32 RX rings.

The below table shows a comparison between existing design and new
design:

IRQ   node-num    core-num   CPU        performance(%)
1      0 | 0       0 | 0     0 | 0-1     0
2      0 | 0       0 | 1     1 | 2-3     3
3      0 | 0       1 | 2     2 | 4-5     10
4      0 | 0       1 | 3     3 | 6-7     15
5      0 | 0       2 | 4     4 | 8-9     15
...
...
25     0 | 0       12| 24    24| 48-49   12
...
32     0 | 0       15| 31    31| 62-63   12
33     0 | 0       16| 0     32| 0-1     10
...
64     0 | 0       31| 31    63| 62-63   0

Signed-off-by: Souradeep Chakrabarti <schakrabarti@linux.microsoft.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microsoft/mana/gdma_main.c