Skip to content

Commit

Permalink
Evicting too many bytes from MFU metadata
Browse files Browse the repository at this point in the history
Without updating 'm' we evict from MFU metadata all that we wanted
to evict from all metadata, including already evicted MRU metadata
('m' is the total amount of metadata we had at the beginning,
and 'w' is the total amount of metadata we want to have). 

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Theera K. <[email protected]>
Closes openzfs#16521
Closes openzfs#16546
  • Loading branch information
tkittich authored and tonyhutter committed Nov 5, 2024
1 parent 5427853 commit 0987892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4311,7 +4311,7 @@ arc_evict(void)

/* Evict MFU metadata. */
w = wt * (int64_t)(arc_meta >> 16) >> 16;
e = MIN((int64_t)(asize - arc_c), (int64_t)(m - w));
e = MIN((int64_t)(asize - arc_c), (int64_t)(m - bytes - w));
bytes = arc_evict_impl(arc_mfu, ARC_BUFC_METADATA, e);
total_evicted += bytes;
mfum -= bytes;
Expand Down

0 comments on commit 0987892

Please sign in to comment.