Skip to content

Commit

Permalink
Remove "arc_meta_used" from arc_adjust calculation
Browse files Browse the repository at this point in the history
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 openzfs#2110
  • Loading branch information
Prakash Surya authored and behlendorf committed Feb 22, 2014
1 parent 94520ca commit 77765b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2144,8 +2144,7 @@ arc_adjust(void)
*/

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

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

0 comments on commit 77765b5

Please sign in to comment.