diff options
author | Florin Coras <fcoras@cisco.com> | 2021-03-31 19:36:49 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2021-04-02 17:15:07 +0000 |
commit | 014dba38cb9579808a2134fd10a071e4f8c4e213 (patch) | |
tree | 8e03931df6e3c7d7d146574f76bd4cec7dad38ed /src/svm/fifo_types.h | |
parent | 115012a0b1d9617c07bae5c82a19125b3c692258 (diff) |
svm: lock-free fifo chunk list push and pop
This avoids chunk allocation/collection deadlocks if either of the sides
crashes.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I98619e6e035fa8688889ca34db2143c8898732df
Diffstat (limited to 'src/svm/fifo_types.h')
-rw-r--r-- | src/svm/fifo_types.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/svm/fifo_types.h b/src/svm/fifo_types.h index 670fd2aff1a..aa8c3616317 100644 --- a/src/svm/fifo_types.h +++ b/src/svm/fifo_types.h @@ -119,14 +119,12 @@ typedef struct _svm_fifo typedef struct fifo_segment_slice_ { + CLIB_CACHE_LINE_ALIGN_MARK (cacheline); fs_sptr_t free_chunks[FS_CHUNK_VEC_LEN]; /**< Free chunks by size */ fs_sptr_t free_fifos; /**< Freelists of fifo shared hdrs */ uword n_fl_chunk_bytes; /**< Chunk bytes on freelist */ uword virtual_mem; /**< Slice sum of all fifo sizes */ u32 num_chunks[FS_CHUNK_VEC_LEN]; /**< Allocated chunks by chunk size */ - - CLIB_CACHE_LINE_ALIGN_MARK (lock); - u32 chunk_lock; } fifo_segment_slice_t; typedef struct fifo_slice_private_ |