]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'sfc-optimize-rxqs-count-and-affinities'
authorJakub Kicinski <kuba@kernel.org>
Wed, 2 Mar 2022 01:12:46 +0000 (17:12 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Mar 2022 01:12:47 +0000 (17:12 -0800)
commit7e6364c81e000d77bb760e460188e18e7401fdf3
treeb5ce522f5197113127db7851597d3286cbc3a74b
parent92290ed9570e7c16c2ceaaa6c9ac3f4212eb00f5
parent4a6ec1c57bd6fd8e27cb201066e81f33376c5269
Merge branch 'sfc-optimize-rxqs-count-and-affinities'

Íñigo Huguet says:

====================
sfc: optimize RXQs count and affinities

In sfc driver one RX queue per physical core was allocated by default.
Later on, IRQ affinities were set spreading the IRQs in all NUMA local
CPUs.

However, with that default configuration it result in a non very optimal
configuration in many modern systems. Specifically, in systems with hyper
threading and 2 NUMA nodes, affinities are set in a way that IRQs are
handled by all logical cores of one same NUMA node. Handling IRQs from
both hyper threading siblings has no benefit, and setting affinities to one
queue per physical core is neither a very good idea because there is a
performance penalty for moving data across nodes (I was able to check it
with some XDP tests using pktgen).

This patches reduce the default number of channels to one per physical
core in the local NUMA node. Then, they set IRQ affinities to CPUs in
the local NUMA node only. This way we save hardware resources since
channels are limited resources. We also leave more room for XDP_TX
channels without hitting driver's limit of 32 channels per interface.

Running performance tests using iperf with a SFC9140 device showed no
performance penalty for reducing the number of channels.

RX XDP tests showed that performance can go down to less than half if
the IRQ is handled by a CPU in a different NUMA node, which doesn't
happen with the new defaults from this patches.
====================

Link: https://lore.kernel.org/r/20220228132254.25787-1-ihuguet@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>