linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
	Ivan Babrou <ivan@cloudflare.com>,
	Rik van Riel <riel@surriel.com>, Linux-MM <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mel Gorman <mgorman@techsingularity.net>
Subject: [PATCH 1/3] mm, page_alloc: Disable boosted watermark based reclaim on low-memory systems
Date: Tue, 25 Feb 2020 14:15:32 +0000	[thread overview]
Message-ID: <20200225141534.5044-2-mgorman@techsingularity.net> (raw)
In-Reply-To: <20200225141534.5044-1-mgorman@techsingularity.net>

An off-list bug report indicated that watermark boosting was affecting a
very small memory system and causing excessive reclaim. Watermark boosting
is intended to reduce the mixing of page mobility types within pageblocks
for high-order allocations. If the system has so little memory that pages
are not even grouped by mobility, then watermark boosting should also
be disabled.

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
 mm/internal.h   | 6 +++++-
 mm/page_alloc.c | 6 ++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/mm/internal.h b/mm/internal.h
index 3cf20ab3ca01..439561cc90d9 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -534,10 +534,14 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone,
 #endif
 #define ALLOC_KSWAPD		0x200 /* allow waking of kswapd */
 
+static inline void disable_watermark_boosting(void)
+{
+	watermark_boost_factor = 0;
+}
+
 enum ttu_flags;
 struct tlbflush_unmap_batch;
 
-
 /*
  * only for MM internal work items which do not depend on
  * any allocations or locks which might depend on allocations
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3c4eb750a199..c5c05b6dc459 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5810,10 +5810,12 @@ void __ref build_all_zonelists(pg_data_t *pgdat)
 	 * made on memory-hotadd so a system can start with mobility
 	 * disabled and enable it later
 	 */
-	if (vm_total_pages < (pageblock_nr_pages * MIGRATE_TYPES))
+	if (vm_total_pages < (pageblock_nr_pages * MIGRATE_TYPES)) {
 		page_group_by_mobility_disabled = 1;
-	else
+		disable_watermark_boosting();
+	} else {
 		page_group_by_mobility_disabled = 0;
+	}
 
 	pr_info("Built %u zonelists, mobility grouping %s.  Total pages: %ld\n",
 		nr_online_nodes,
-- 
2.16.4



  reply	other threads:[~2020-02-25 14:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 14:15 [PATCH 0/3] Limit runaway reclaim due to watermark boosting Mel Gorman
2020-02-25 14:15 ` Mel Gorman [this message]
2020-02-25 14:15 ` [PATCH 2/3] mm, page_alloc: Disable watermark boosting if THP is disabled at boot Mel Gorman
2020-02-26  1:32   ` David Rientjes
2020-02-26  8:07     ` Mel Gorman
2020-02-25 14:15 ` [PATCH 3/3] mm, vmscan: Do not reclaim for boosted watermarks at high priority Mel Gorman
2020-02-26  2:51 ` [PATCH 0/3] Limit runaway reclaim due to watermark boosting Andrew Morton
2020-02-26  8:04   ` Mel Gorman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200225141534.5044-2-mgorman@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=ivan@cloudflare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=riel@surriel.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox