From patchwork Mon Nov 26 14:35:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 10698423 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 456E5109C for ; Mon, 26 Nov 2018 14:35:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34145296FC for ; Mon, 26 Nov 2018 14:35:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 285452985C; Mon, 26 Nov 2018 14:35:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DC57296FC for ; Mon, 26 Nov 2018 14:35:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 80F516B422D; Mon, 26 Nov 2018 09:35:11 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 796C16B422E; Mon, 26 Nov 2018 09:35:11 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 638D26B422F; Mon, 26 Nov 2018 09:35:11 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id 03FE86B422D for ; Mon, 26 Nov 2018 09:35:11 -0500 (EST) Received: by mail-ed1-f70.google.com with SMTP id d41so9013330eda.12 for ; Mon, 26 Nov 2018 06:35:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:date:from:to :cc:subject:message-id:references:mime-version:content-disposition :in-reply-to:user-agent; bh=TKkzp/HGZ3egVAA2FrjBII3poDXeQdCjH6Di0no3tUc=; b=fjWxZnWRUHknxWsQKO5qjYtqH3GnRhPCK8S7cciVYWb8TRg4bjRaDCMjENs4oNCRH3 zu6UZgKSngRZxGXfcpavuByn/FPhx0liLENID2ly/OHs24qyTimRkBTfWuUtCBm9cmA7 pK8mTGAGSrKCz9kDPcTh76w+b8M4cIaFyH42hCa8NI4/Y75XqP8TF7lbio49DVZhuUDK V1bQVqnWcC7MgFBj0N5KCFx/6g24hs5+Gu/uEgVJuRn9ilbXgi5eQ8libiC1pA3OFhMr rg6W7YMnUw93D9yCI7g+U9BG2nFwe6V7SQbsYHrsd3q3KeQda9BuwIpM2BoynT9tYkN8 aUog== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Gm-Message-State: AA+aEWZm1Lk6Ch0Kc63ma4P8hRQ/m3rFqIJg58QkjfkVM15k2B/lhVkD Lf3y4PCIIcN8STgUWs1d4Dr/lqO2M+FtLI0ZQcrCvuFO1iV1JhrTYihYT0o+YzHluMebTmeE4IG Gyh19hS2tpRMbp+p1TExT3uP3kFbw+fizQIS+zOF6Y22sm+yvXYWyj+K4BL4yW1LDHg== X-Received: by 2002:a50:acc3:: with SMTP id x61mr22921291edc.76.1543242910495; Mon, 26 Nov 2018 06:35:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/WM33FfohJme3g8gnRstvvGdPgFFZp5yrEo3r4sGf+samA3PyBq39FIRITvg3R/x4gh66nP X-Received: by 2002:a50:acc3:: with SMTP id x61mr22920992edc.76.1543242905488; Mon, 26 Nov 2018 06:35:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543242905; cv=none; d=google.com; s=arc-20160816; b=ek59JVhfaSbhWyC6DgDhFVXoWeveIxDqOes2rRhCCyXm/3cAl1aUq/UuGrjIsvFRQK UZaev8iQkMBBRrLgdM8bfbcQ2xL5GtW+K4QpP7ZBy0RpQ4xnwY1zvbQShyKvvEZEeS42 cNyIuHtxn5T3jjjh3sz7M6O+pjHxZM1J+Dswe5vikCfZA+30i8C6eYsnbTX9e8/fnqkZ 3xTV+07c3iAmtTWuCugAccUb/hRjZsmqoIZ9XBRVy3ydvTmS+15KjGlx/rF2xFlH+Fa4 9XEmLb+Cq6um7GNoeidJEWLHXWvXhXRDl1Ng7697r1rw5Db/0L6HS+ZXBnaGZRaF2BYW g87Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date; bh=TKkzp/HGZ3egVAA2FrjBII3poDXeQdCjH6Di0no3tUc=; b=IEi4QnPIxnqZrKQqLUU5EB6ypjX0CLBfhnmY84JEnFnnCI40UXPH8iwbrzG14a6drl iQY969PcQtjULShBnN0kUXooRTGNCeyRZzhHHShXJPtWjv6E4hxBxUrWXFMlGE31ze7w rlTqGIPfgjw+qhbPjWBT7Sd7oIQNgxmGoxqbeM9YrNVTuwzJmFxEYe7ZYPZ2Ag1T0su0 o2mpXw01FY1sRvdvXuK8jgXTjiHfUbQ8oKrvtBKMr3onqZVBpFZqNN8vHjopS/LklZo+ UrXOlXxUz2vz4PmuLr0Uzkg/9ZBT5qaaCpcNG5BOJ30F9wU5EpshxcmwjppZHEp3Q6b5 itMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from outbound-smtp12.blacknight.com (outbound-smtp12.blacknight.com. [46.22.139.17]) by mx.google.com with ESMTPS id n23si401920edt.94.2018.11.26.06.35.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 06:35:05 -0800 (PST) Received-SPF: pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) client-ip=46.22.139.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp12.blacknight.com (Postfix) with ESMTPS id DF7E51C2CBB for ; Mon, 26 Nov 2018 14:35:04 +0000 (GMT) Received: (qmail 25380 invoked from network); 26 Nov 2018 14:35:04 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[37.228.229.69]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 26 Nov 2018 14:35:04 -0000 Date: Mon, 26 Nov 2018 14:35:03 +0000 From: Mel Gorman To: Andrew Morton Cc: Vlastimil Babka , David Rientjes , Andrea Arcangeli , Zi Yan , Michal Hocko , LKML , Linux-MM Subject: [PATCH] mm: Use alloc_flags to record if kswapd can wake -fix Message-ID: <20181126143503.GO23260@techsingularity.net> References: <20181123114528.28802-1-mgorman@techsingularity.net> <20181123114528.28802-4-mgorman@techsingularity.net> <39711f99-1a2a-67d3-5cb0-a63ac739a917@suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <39711f99-1a2a-67d3-5cb0-a63ac739a917@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Vlastimil Babka correctly pointed out that the ALLOC_KSWAPD flag needs to be applied in the !CONFIG_ZONE_DMA32 case. This is a fix for the mmotm path mm-use-alloc_flags-to-record-if-kswapd-can-wake.patch Signed-off-by: Mel Gorman --- mm/page_alloc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e44eb68744ed..a48ebb821360 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3268,7 +3268,6 @@ static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone) } #endif /* CONFIG_NUMA */ -#ifdef CONFIG_ZONE_DMA32 /* * The restriction on ZONE_DMA32 as being a suitable zone to use to avoid * fragmentation is subtle. If the preferred zone was HIGHMEM then @@ -3285,6 +3284,7 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) if (gfp_mask & __GFP_KSWAPD_RECLAIM) alloc_flags |= ALLOC_KSWAPD; +#ifdef CONFIG_ZONE_DMA32 if (zone_idx(zone) != ZONE_NORMAL) goto out; @@ -3298,15 +3298,9 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) goto out; out: +#endif /* CONFIG_ZONE_DMA32 */ return alloc_flags; } -#else -static inline unsigned int -alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) -{ - return 0; -} -#endif /* * get_page_from_freelist goes through the zonelist trying to allocate