[dpdk-dev] [PATCH v3 4/4] eventdev: relax smp barriers with C11 atomics

Phil Yang Phil.Yang at arm.com
Tue Jul 7 17:56:53 CEST 2020


> -----Original Message-----
> From: Jerin Jacob <jerinjacobk at gmail.com>
> Sent: Tuesday, July 7, 2020 10:30 PM
> To: Phil Yang <Phil.Yang at arm.com>
> Cc: thomas at monjalon.net; Erik Gabriel Carrillo <erik.g.carrillo at intel.com>;
> dpdk-dev <dev at dpdk.org>; jerinj at marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>; David Christensen
> <drc at linux.vnet.ibm.com>; Ruifeng Wang <Ruifeng.Wang at arm.com>;
> Dharmik Thakkar <Dharmik.Thakkar at arm.com>; nd <nd at arm.com>; David
> Marchand <david.marchand at redhat.com>; Ray Kinsella <mdr at ashroe.eu>;
> Neil Horman <nhorman at tuxdriver.com>; dodji at redhat.com
> Subject: Re: [dpdk-dev] [PATCH v3 4/4] eventdev: relax smp barriers with
> C11 atomics
> 
> On Tue, Jul 7, 2020 at 4:45 PM Phil Yang <phil.yang at arm.com> wrote:
> >
> > The impl_opaque field is shared between the timer arm and cancel
> > operations. Meanwhile, the state flag acts as a guard variable to
> > make sure the update of impl_opaque is synchronized. The original
> > code uses rte_smp barriers to achieve that. This patch uses C11
> > atomics with an explicit one-way memory barrier instead of full
> > barriers rte_smp_w/rmb() to avoid the unnecessary barrier on aarch64.
> >
> > Since compilers can generate the same instructions for volatile and
> > non-volatile variable in C11 __atomics built-ins, so remain the volatile
> > keyword in front of state enum to avoid the ABI break issue.
> >
> > Signed-off-by: Phil Yang <phil.yang at arm.com>
> > Reviewed-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
> > Acked-by: Erik Gabriel Carrillo <erik.g.carrillo at intel.com>
> 
> 
> Could you fix the following:
> 
> WARNING:TYPO_SPELLING: 'opague' may be misspelled - perhaps 'opaque'?
> #184: FILE: lib/librte_eventdev/rte_event_timer_adapter.c:1161:
> + * specific opague data under the correct state.
Done. 

Thanks,
Phil


More information about the dev mailing list