Evicting too many bytes from MFU metadata

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 #16521
Closes #16546
This commit is contained in:
Theera K. authored and GitHub committed 2024-09-23 22:12:56 -07:00
1 parent 9c03b22f8f
commit d40d40913d
1 file changed
+1 -1
+1 -1
View File
@@ -4325,7 +4325,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;