]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix arc_p aggressive increase
authorshodanshok <g.danti@assyoma.it>
Fri, 11 Nov 2022 18:41:36 +0000 (19:41 +0100)
committerGitHub <noreply@github.com>
Fri, 11 Nov 2022 18:41:36 +0000 (10:41 -0800)
commitb445b25b273d263f032fadd717e5731185b74bf5
treef7236fbde27ed097093d98706b4d52b7b957d166
parent9f4ede63d23be4f43ba8dd0ca42c6a773a8eaa8d
Fix arc_p aggressive increase

The original ARC paper called for an initial 50/50 MRU/MFU split
and this is accounted in various places where arc_p = arc_c >> 1,
with further adjustment based on ghost lists size/hit. However, in
current code both arc_adapt() and arc_get_data_impl() aggressively
grow arc_p until arc_c is reached, causing unneeded pressure on
MFU and greatly reducing its scan-resistance until ghost list
adjustments kick in.

This patch restores the original behavior of initially having arc_p
as 1/2 of total ARC, without preventing MRU to use up to 100% total
ARC when MFU is empty.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Gionatan Danti <g.danti@assyoma.it>
Closes #14137
Closes #14120
module/zfs/arc.c