Skip to content

Commit

Permalink
Fix zfs_arc_max minimum tuning
Browse files Browse the repository at this point in the history
When setting `zfs_arc_max` its minimum value is allowed
to be 64 MiB.  There was an off-by-1 error which can matter
on tiny systems.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Zubrzycki <github@mid-earth.net>
Closes #7417
  • Loading branch information
beren12 authored and tonyhutter committed May 8, 2018
1 parent 4ed3095 commit cca220d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6358,7 +6358,7 @@ arc_tuning_update(void)

/* Valid range: 64M - <all physical memory> */
if ((zfs_arc_max) && (zfs_arc_max != arc_c_max) &&
(zfs_arc_max > 64 << 20) && (zfs_arc_max < allmem) &&
(zfs_arc_max >= 64 << 20) && (zfs_arc_max < allmem) &&
(zfs_arc_max > arc_c_min)) {
arc_c_max = zfs_arc_max;
arc_c = arc_c_max;
Expand Down

0 comments on commit cca220d

Please sign in to comment.