[ovs-dev] [PATCH] netdev-dpdk: Fix Tx queue false sharing.

Eelco Chaudron echaudro at redhat.com
Thu Sep 12 13:07:00 UTC 2019



On 26 Aug 2019, at 16:54, Ilya Maximets wrote:

> 'tx_q' array is allocated for each DPDK netdev.  'struct 
> dpdk_tx_queue'
> is 8 bytes long, so 8 tx queues are sharing the same cache line in
> case of 64B cacheline size.  This causes 'false sharing' issue in
> mutliqueue case because taking the spinlock implies write to memory
> i.e. cache invalidation.
>
> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
> ---
>
> I didn't really test the performance impact yet, so testing is very
> welcome.  Relevant test case could be PVP with 8 queues in HW NIC and
> 8 queues in vhost-user inerface and 8 PMD threads.

Did a quick test on my setup, but I do not have enough cores to do 8 PMD 
threads and 8 VM cores. So I did a 4 core PMD/VM test running PV (not 
PVP as we do not care about receiving traffic from the VHOST) using 64 
bytes packets and 100 L3 flows.

Without the patch, I get 17,408,585 pps and with the patch 17,573,089 
pps.

The patch looks good to me…

Acked-by: Eelco Chaudron <echaudro at redhat.com>






More information about the dev mailing list