]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
bcachefs-tools: Fix typo in 872cd43
authorChris Webb <chris@arachsys.com>
Sun, 10 Dec 2023 07:28:31 +0000 (07:28 +0000)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 10 Dec 2023 17:14:23 +0000 (12:14 -0500)
6% of physical RAM is info.totalram >> 4 not info.totalram << 4.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
linux/shrinker.c

index 8a24565ff15c94984db2e437aa37a35aa578c383..8806976943794ba8af8056a7c7fea02106fb043a 100644 (file)
@@ -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;