[dpdk-dev] [PATCH 2/2] lib/timer: relax barrier for status update

Phil Yang Phil.Yang at arm.com
Wed Apr 8 12:23:53 CEST 2020


> -----Original Message-----
> From: Phil Yang <phil.yang at arm.com>
> Sent: Monday, February 24, 2020 2:42 PM
> To: rsanford at akamai.com; erik.g.carrillo at intel.com; dev at dpdk.org
> Cc: david.marchand at redhat.com; anatoly.burakov at intel.com;
> thomas at monjalon.net; jerinj at marvell.com; hemant.agrawal at nxp.com;
> Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>; Gavin Hu
> <Gavin.Hu at arm.com>; Phil Yang <Phil.Yang at arm.com>; nd <nd at arm.com>
> Subject: [PATCH 2/2] lib/timer: relax barrier for status update
> 
> Volatile has no ordering semantics. The rte_timer structure defines
> timer status as a volatile variable and uses the rte_r/wmb barrier
> to guarantee inter-thread visibility.
> 
> This patch optimized the volatile operation with c11 atomic operations
> and one-way barrier to save the performance penalty. According to the
> timer_perf_autotest benchmarking results, this patch can uplift 10%~16%
> timer appending performance, 3%~20% timer resetting performance and 45%
> timer callbacks scheduling performance on aarch64 and no loss in
> performance for x86.
> 
> Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Signed-off-by: Phil Yang <phil.yang at arm.com>
> Reviewed-by: Gavin Hu <gavin.hu at arm.com>
> ---
>  lib/librte_timer/rte_timer.c | 90 +++++++++++++++++++++++++++++++----

Ping. 

Thanks,
Phil


More information about the dev mailing list