summarylogtreecommitdiffstats
path: root/0014-ZEN-mm-Disable-watermark-boosting-by-default.patch
diff options
context:
space:
mode:
authorBjörn Bidar2022-08-15 01:41:36 +0300
committerBjörn Bidar2022-08-15 01:53:06 +0300
commit0c2ed81feac01240fdc5ed571ed3b563ec0dbec2 (patch)
tree4a5ab325dfb9791e85081e2df5721c2f8dfb875b /0014-ZEN-mm-Disable-watermark-boosting-by-default.patch
parent231af842c35d87c5eb9f89c268d376ca9340bdaf (diff)
downloadaur-0c2ed81feac01240fdc5ed571ed3b563ec0dbec2.tar.gz
Update to 5.19.1.pf2-1
- New upstream release based on 5.19.1 - Updated ZEN patches - Drop ZEN MGLRU patch - Sync kernel config with Arch and Arch32 Signed-off-by: Björn Bidar <bjorn.bidar@thaodan.de>
Diffstat (limited to '0014-ZEN-mm-Disable-watermark-boosting-by-default.patch')
-rw-r--r--0014-ZEN-mm-Disable-watermark-boosting-by-default.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/0014-ZEN-mm-Disable-watermark-boosting-by-default.patch b/0014-ZEN-mm-Disable-watermark-boosting-by-default.patch
new file mode 100644
index 000000000000..82cc95865f15
--- /dev/null
+++ b/0014-ZEN-mm-Disable-watermark-boosting-by-default.patch
@@ -0,0 +1,45 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Sultan Alsawaf <sultan@kerneltoast.com>
+Date: Sat, 28 Mar 2020 13:06:28 -0700
+Subject: [PATCH] ZEN: mm: Disable watermark boosting by default
+
+What watermark boosting does is preemptively fire up kswapd to free
+memory when there hasn't been an allocation failure. It does this by
+increasing kswapd's high watermark goal and then firing up kswapd. The
+reason why this causes freezes is because, with the increased high
+watermark goal, kswapd will steal memory from processes that need it in
+order to make forward progress. These processes will, in turn, try to
+allocate memory again, which will cause kswapd to steal necessary pages
+from those processes again, in a positive feedback loop known as page
+thrashing. When page thrashing occurs, your system is essentially
+livelocked until the necessary forward progress can be made to stop
+processes from trying to continuously allocate memory and trigger
+kswapd to steal it back.
+
+This problem already occurs with kswapd *without* watermark boosting,
+but it's usually only encountered on machines with a small amount of
+memory and/or a slow CPU. Watermark boosting just makes the existing
+problem worse enough to notice on higher spec'd machines.
+
+Disable watermark boosting by default since it's a total dumpster fire.
+I can't imagine why anyone would want to explicitly enable it, but the
+option is there in case someone does.
+
+Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
+---
+ mm/page_alloc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index b5b14b78c4fd4844cb071022570fd4b7e6959eb2..d6fc4723c4e9137a3bf8193fcbad1bb23f041c43 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -342,7 +342,7 @@ compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS] = {
+
+ int min_free_kbytes = 1024;
+ int user_min_free_kbytes = -1;
+-int watermark_boost_factor __read_mostly = 15000;
++int watermark_boost_factor __read_mostly;
+ int watermark_scale_factor = 10;
+
+ static unsigned long nr_kernel_pages __initdata;