[dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization

Stephen Hemminger stephen at networkplumber.org
Fri Sep 2 18:12:36 CEST 2016


On Fri,  2 Sep 2016 13:25:06 +0800
lilinzhe <slayercat.subscription at gmail.com> wrote:

> From: 李林哲 <lilinzhe at ijinshan.com>
> 
> chagne atomic ref update to always call atomic_add
> 
> when mbuf is allocated by cpu1 and freed by cpu2. cpu1 cache may not be updated by such a set operation.
> causes refcnt reads incorrect values.

What architecture are you dealing with? On X86 memory is cache coherent.

Doing atomic operation all the time on each mbuf free would significantly
slow down performance.



More information about the dev mailing list