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 <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Theera K. <tkittich@hotmail.com>
Closes #16521
Closes #16546
This commit is contained in:
Theera K. 2024-09-24 12:12:56 +07:00 committed by GitHub
parent 9c03b22f8f
commit d40d40913d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;