diff options
author | Sirshak Das <sirshak.das@arm.com> | 2018-11-07 18:46:42 -0600 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2018-11-28 20:50:21 +0000 |
commit | 19515acddc343d1680d4a5d27f39456999498591 (patch) | |
tree | 96d7e4be9ca0379b252482f5081f3abeea7d32cb /src/svm/svm_fifo.h | |
parent | 5785e89ba15128f9659bf0b6f78559c63a70e285 (diff) |
Use acquire/release ordering when accessing svm_fifo shared variable cursize
Improves TCP iperf3 performance by ~3% on AArch64.
Change-Id: I1e51bd8403ba45ec6af4c2f96b95e884c1ae0d67
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Diffstat (limited to 'src/svm/svm_fifo.h')
-rw-r--r-- | src/svm/svm_fifo.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h index e049d3e3147..791b513a4a6 100644 --- a/src/svm/svm_fifo.h +++ b/src/svm/svm_fifo.h @@ -113,19 +113,19 @@ u8 *svm_fifo_replay (u8 * s, svm_fifo_t * f, u8 no_read, u8 verbose); static inline u32 svm_fifo_max_dequeue (svm_fifo_t * f) { - return f->cursize; + return clib_atomic_load_acq_n (&f->cursize); } static inline int svm_fifo_is_full (svm_fifo_t * f) { - return (f->cursize == f->nitems); + return (clib_atomic_load_acq_n (&f->cursize) == f->nitems); } static inline int svm_fifo_is_empty (svm_fifo_t * f) { - return (f->cursize == 0); + return (clib_atomic_load_acq_n (&f->cursize) == 0); } static inline u32 |