From dbf0ae645132a271534d8d5ff1552d2c4c8aa156 Mon Sep 17 00:00:00 2001 From: Sherin T George Date: Tue, 17 Dec 2024 06:00:22 +0530 Subject: [PATCH] DAOS-16818 common: Evict NE memory bucket when empty - MD_ON_SSD_p2 Removed the code to trigger gc from dav_obj_open_internal(). Signed-off-by: Sherin T George --- src/common/dav_v2/dav_iface.c | 2 -- src/common/dav_v2/heap.c | 6 +++--- src/vos/tests/vts_wal.c | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/common/dav_v2/dav_iface.c b/src/common/dav_v2/dav_iface.c index 4de91d0d687a..52e48fdefbb9 100644 --- a/src/common/dav_v2/dav_iface.c +++ b/src/common/dav_v2/dav_iface.c @@ -237,8 +237,6 @@ dav_obj_open_internal(int fd, int flags, size_t scm_sz, const char *path, struct palloc_heap_vg_open(hdl->do_heap, 1); #endif - dav_force_gc_v2(hdl); - hdl->do_booted = 1; return hdl; diff --git a/src/common/dav_v2/heap.c b/src/common/dav_v2/heap.c index a6a4e67291f2..61b7ed2e2b1c 100644 --- a/src/common/dav_v2/heap.c +++ b/src/common/dav_v2/heap.c @@ -2325,9 +2325,9 @@ heap_force_recycle(struct palloc_heap *heap) heap_populate_nemb_unused(heap); mb->prev_usage = mb->space_usage; - if (heap->rt->empty_nemb_cnt >= heap->rt->empty_nemb_gcth) - D_ERROR("Force GC failed to free up enough nembs, cnt = %d", - heap->rt->empty_nemb_cnt); + if (max_reclaim && (heap->rt->empty_nemb_cnt >= heap->rt->empty_nemb_gcth)) + D_WARN("Force GC failed to free up enough nembs, cnt = %d", + heap->rt->empty_nemb_cnt); return 0; } diff --git a/src/vos/tests/vts_wal.c b/src/vos/tests/vts_wal.c index 968a41caaff7..83303ad213da 100644 --- a/src/vos/tests/vts_wal.c +++ b/src/vos/tests/vts_wal.c @@ -1833,6 +1833,10 @@ nemb_unused(void **state) cont = vos_hdl2cont(arg->ctx.tc_co_hdl); umm = vos_cont2umm(cont); + /* Force GC */ + umem_heap_gc(umm); + umem_heap_gc(umm); + rc = umempobj_get_mbusage(umm->umm_pool, 0, &cur_allocated, &maxsz); assert_true(rc == 0); print_message("phase6: nemb space utilization is %lu max is %lu\n", cur_allocated, maxsz);