[dpdk-dev] [PATCH 3/5] lib/stack: remove redundant orderings for list->len

Eads, Gage gage.eads at intel.com
Mon Sep 21 19:16:39 CEST 2020



> -----Original Message-----
> From: Steven Lariau <steven.lariau at arm.com>
> Sent: Friday, September 11, 2020 10:30 AM
> To: Eads, Gage <gage.eads at intel.com>; Olivier Matz <olivier.matz at 6wind.com>
> Cc: dev at dpdk.org; nd at arm.com; dharmik.thakkar at arm.com; Steven Lariau
> <steven.lariau at arm.com>
> Subject: [PATCH 3/5] lib/stack: remove redundant orderings for list->len
> 
> The load-acquire of list->len on pop function is redundant.
> Only the CAS success needs to be load-acquire.
> It synchronizes with the store release in push, to ensure that the
> updated head is visible when the new length is visible.
> Without this, one thread in pop could see the increased length but the
> old list, which doesn't have enough items yet for pop to succeed.
> 
> Signed-off-by: Steven Lariau <steven.lariau at arm.com>
> Reviewed-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>

Acked-by: Gage Eads <gage.eads at intel.com>

Thanks,
Gage


More information about the dev mailing list