X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Farc.c;h=f71c24844e8b3821d220de97ab90c0932476f7e5;hb=23bdb07d4e4c435205d25d3efdb5fef2d089ce5e;hp=ff631e61b2eaa2eaf04d2ad1712f6f17db554060;hpb=abd8610cd5ffd04f0fa07297f53852e744ea389e;p=zfs.git diff --git a/module/zfs/arc.c b/module/zfs/arc.c index ff631e6..f71c248 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -3559,12 +3559,12 @@ arc_init(void) /* set min cache to 1/32 of all memory, or 64MB, whichever is more */ arc_c_min = MAX(arc_c / 4, 64<<20); - /* set max to 3/4 of all memory, or all but 1GB, whichever is more */ - if (arc_c * 8 >= 1<<30) - arc_c_max = (arc_c * 8) - (1<<30); + /* set max to 1/2 of all memory, or all but 4GB, whichever is more */ + if (arc_c * 8 >= ((uint64_t)4<<30)) + arc_c_max = (arc_c * 8) - ((uint64_t)4<<30); else arc_c_max = arc_c_min; - arc_c_max = MAX(arc_c * 6, arc_c_max); + arc_c_max = MAX(arc_c * 4, arc_c_max); /* * Allow the tunables to override our calculations if they are