Blob Blame History Raw
From dc134b85f201066ed6ba73eed5ff724c3d178c7a Mon Sep 17 00:00:00 2001
From: Mel Gorman <mgorman@suse.de>
Date: Sun, 10 Feb 2019 09:39:24 +0000
Subject: [PATCH] mm: Adjust watermark boost factor tunable

Patch-mainline: No, reclaim behaviour differs in mainline
References: bnc#1122972

The patch
patches.suse/mm-reclaim-small-amounts-of-memory-when-an-external-fragmentation-event-occurs.patch
boosts watermarks slightly in the event of external fragmentation to
reduce future external fragmentation events.  The impact is that reclaim
is smoother but also occurs sooner and may prevent some page cache or
slab objects remaining resident when they otherwise would be available.

In bonnie, it was reported that delete was slower with the patch applied
and tracing indicated that, in xfs at least, it was due to buffer objects
being reclaimed and then reread from disk incurring a delay.

This patch adjusts the tunable slightly to reduce the number of objects
reclaimed with the negative impact that external fragmentation events
are slightly more common but still far less than a full revert.

Signed-off-by: Mel Gorman <mgorman@suse.de>
---
 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 63e483e398db..609ac01a637d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -264,7 +264,7 @@ compound_page_dtor * const compound_page_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 = 10000;
 int watermark_scale_factor = 10;
 
 static unsigned long __meminitdata nr_kernel_pages;