Skip to content

Commit 77765b5

Browse files
Prakash Suryabehlendorf
authored andcommitted
Remove "arc_meta_used" from arc_adjust calculation
Using "arc_meta_used" to determine if the arc's mru list is over it's target value of "arc_p" doesn't seem correct. The size of the mru list and the value of "arc_meta_used", although related, are completely independent. Buffers contained in "arc_meta_used" may not even be contained in the arc's mru list. As such, this patch removes "arc_meta_used" from the calculation in arc_adjust. Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #2110
1 parent 94520ca commit 77765b5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

module/zfs/arc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,8 +2144,7 @@ arc_adjust(void)
21442144
*/
21452145

21462146
adjustment = MIN((int64_t)(arc_size - arc_c),
2147-
(int64_t)(arc_anon->arcs_size + arc_mru->arcs_size + arc_meta_used -
2148-
arc_p));
2147+
(int64_t)(arc_anon->arcs_size + arc_mru->arcs_size - arc_p));
21492148

21502149
if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_DATA] > 0) {
21512150
delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_DATA], adjustment);

0 commit comments

Comments
 (0)