From: Chris Webb Date: Sun, 10 Dec 2023 07:28:31 +0000 (+0000) Subject: bcachefs-tools: Fix typo in 872cd43 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b44629a3dbe35f9ef84d3fa61b9d9f1a08b47075;p=bcachefs-tools-debian bcachefs-tools: Fix typo in 872cd43 6% of physical RAM is info.totalram >> 4 not info.totalram << 4. Signed-off-by: Chris Webb Signed-off-by: Kent Overstreet --- diff --git a/linux/shrinker.c b/linux/shrinker.c index 8a24565..8806976 100644 --- a/linux/shrinker.c +++ b/linux/shrinker.c @@ -71,7 +71,7 @@ void run_shrinkers(gfp_t gfp_mask, bool allocation_failed) si_meminfo(&info); /* Aim for 6% of physical RAM free without anything in swap */ - want_shrink = (info.totalram << 4) - info.freeram + want_shrink = (info.totalram >> 4) - info.freeram + info.totalswap - info.freeswap; if (want_shrink <= 0) return;