summaryrefslogtreecommitdiffstats
path: root/src/svm/fifo_types.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-12-07 14:33:58 -0800
committerFlorin Coras <florin.coras@gmail.com>2020-12-23 02:27:52 +0000
commit213b1bb3b9652ce2937e3b47573cc54ee3008387 (patch)
tree0445b51256183db2c8593390a1f95e0234dbffc6 /src/svm/fifo_types.h
parent0da8168423349dfb1852d4708d67014de36748b8 (diff)
svm: remove fifo segment heap
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I518e096fe13847759806ff62009e73fd8f7451b7
Diffstat (limited to 'src/svm/fifo_types.h')
-rw-r--r--src/svm/fifo_types.h9
1 files changed, 6 insertions, 3 deletions
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,