From b44629a3dbe35f9ef84d3fa61b9d9f1a08b47075 Mon Sep 17 00:00:00 2001 From: Chris Webb Date: Sun, 10 Dec 2023 07:28:31 +0000 Subject: [PATCH] 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 --- linux/shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/shrinker.c b/linux/shrinker.c index 8a24565f..88069769 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;