Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3722815ybv; Tue, 25 Feb 2020 06:16:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxMhZe/GFiInm3KYpjJyOY/9bKVODG7B3MUrv8FxFNVN/bne9i0TTL2W2fDm2Y+ZAXGr+II X-Received: by 2002:aca:44d7:: with SMTP id r206mr3686920oia.33.1582640167252; Tue, 25 Feb 2020 06:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582640167; cv=none; d=google.com; s=arc-20160816; b=HRs0CVzh7vLNvglJkKOyen05ziebH0GWx5BFqV0N5WZFMzP5WByjvGlQD3o0wugQfv gTvnt3C11EjGUNn1yoOap+9yT53Sn5CTb36UZy50wvfiq2FoncNSLUeMSkNe3+i0c0fQ iIOqV49m3VdLbDr13LwbqrExo7GanLMF9iYHtstv7j3W8DHkvyF/PV2V5uX/S2Z0MjIp uaVSC1tAOOLeEoa9ftcPql5ceKYAVq92ZKoBK9oYTcz/63cis0W/JnQQwGjEp/L1DVAD gLZi6828vFNDBnPyScNg1QZ+cba4PGTpi2UEnZFCAWASOVBVpN4Rb39Zrg/D5mTzr1yJ u6Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ZL1rRNnZ+t+9U6jg7oECZ+9qM6VMi+PkA82HiJlawdw=; b=J4kJ93/uFb8ZR8UP1VG/fSbNMhqYxs8FY2dWpYucWwTJu+67U+hx08UXsSw8tcvInL u5ziCSl/UViyOZyEya/OrlASma6DfQi9eYdfUJ4KVERAlh3118UQYEQ1A4V45HHElqEb 53MzhzN/88Gt1vzJJyZoAbs5Ll8Te/OSAs94wVXJX1rlnzHnG7xthNS1EAFGIMN4mxEO 4FFxSPDrpytgmga2PpoPG6xEV+eAKgwIDq3FN4/w+dNYtTr6Ng+w1ZHUcV6YWI2CAJXw j0IoBPFOB3nvkAVcMjuo0qsNY5HgpPEa0kMglrKSdPjQuSBswb1iH0ztl5Mg06gowMqY 8MpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si7003540oia.264.2020.02.25.06.15.52; Tue, 25 Feb 2020 06:16:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730624AbgBYOPl (ORCPT + 99 others); Tue, 25 Feb 2020 09:15:41 -0500 Received: from outbound-smtp24.blacknight.com ([81.17.249.192]:36838 "EHLO outbound-smtp24.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729411AbgBYOPi (ORCPT ); Tue, 25 Feb 2020 09:15:38 -0500 Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp24.blacknight.com (Postfix) with ESMTPS id 6B8ADC0ACD for ; Tue, 25 Feb 2020 14:15:36 +0000 (GMT) Received: (qmail 1897 invoked from network); 25 Feb 2020 14:15:36 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.18.57]) by 81.17.254.9 with ESMTPA; 25 Feb 2020 14:15:36 -0000 From: Mel Gorman To: Andrew Morton Cc: Michal Hocko , Vlastimil Babka , Ivan Babrou , Rik van Riel , Linux-MM , Linux Kernel Mailing List , Mel Gorman 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 Message-Id: <20200225141534.5044-2-mgorman@techsingularity.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200225141534.5044-1-mgorman@techsingularity.net> References: <20200225141534.5044-1-mgorman@techsingularity.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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