From 213b1bb3b9652ce2937e3b47573cc54ee3008387 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 7 Dec 2020 14:33:58 -0800 Subject: svm: remove fifo segment heap Type: improvement Signed-off-by: Florin Coras Change-Id: I518e096fe13847759806ff62009e73fd8f7451b7 --- src/svm/fifo_types.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/svm/fifo_types.h') diff --git a/src/svm/fifo_types.h b/src/svm/fifo_types.h index 234fd9f2f7b..9182a2ac3cf 100644 --- a/src/svm/fifo_types.h +++ b/src/svm/fifo_types.h @@ -107,14 +107,14 @@ typedef struct fifo_segment_slice_ u32 *num_chunks; /**< Allocated chunks by chunk size */ uword n_fl_chunk_bytes; /**< Chunk bytes on freelist */ uword virtual_mem; /**< Slice sum of all fifo sizes */ - clib_spinlock_t chunk_lock; + u32 n_chunk_lens; + CLIB_CACHE_LINE_ALIGN_MARK (lock); + u32 chunk_lock; } fifo_segment_slice_t; struct fifo_segment_header_ { fifo_segment_slice_t *slices; /** Fixed array of slices */ - ssvm_shared_header_t *ssvm_sh; /**< Pointer to fs ssvm shared hdr */ - uword n_free_bytes; /**< Segment free bytes */ uword n_cached_bytes; /**< Cached bytes */ u32 n_active_fifos; /**< Number of active fifos */ u32 n_reserved_bytes; /**< Bytes not to be allocated */ @@ -124,6 +124,9 @@ struct fifo_segment_header_ u8 high_watermark; /**< Memory pressure watermark high */ u8 low_watermark; /**< Memory pressure watermark low */ u8 pct_first_alloc; /**< Pct of fifo size to alloc */ + CLIB_CACHE_LINE_ALIGN_MARK (allocator); + uword byte_index; + uword max_byte_index; }; void fsh_virtual_mem_update (fifo_segment_header_t * fsh, u32 slice_index, -- cgit 1.2.3-korg