Skip to content

Commit

Permalink
DAOS-16818 common: Evict NE memory bucket when empty - MD_ON_SSD_p2
Browse files Browse the repository at this point in the history
Removed the code to trigger gc from dav_obj_open_internal().
Allow-unstable-test: true

Signed-off-by: Sherin T George <[email protected]>
  • Loading branch information
sherintg committed Dec 17, 2024
1 parent 15d498d commit 37c8dd9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/common/dav_v2/dav_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/common/dav_v2/heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 4 additions & 0 deletions src/vos/tests/vts_wal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 37c8dd9

Please sign in to comment.