From patchwork Tue Nov 13 04:17:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 10679537 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 F06C013BB for ; Tue, 13 Nov 2018 04:18:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C668029D1C for ; Tue, 13 Nov 2018 04:18:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FCF229D32; Tue, 13 Nov 2018 04:18:02 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 18E2E29D1C for ; Tue, 13 Nov 2018 04:18:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 80A166B0005; Mon, 12 Nov 2018 23:18:00 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 791B36B0006; Mon, 12 Nov 2018 23:18:00 -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 6321E6B0007; Mon, 12 Nov 2018 23:18:00 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by kanga.kvack.org (Postfix) with ESMTP id 1B9516B0005 for ; Mon, 12 Nov 2018 23:18:00 -0500 (EST) Received: by mail-pf1-f200.google.com with SMTP id i22-v6so8519365pfj.1 for ; Mon, 12 Nov 2018 20:18:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id; bh=HMmJibSrAynUwKhby60Ri0xmOKkhaXCBIIErp75jOPI=; b=F0M6UoX+N0zbIeJZwvKU8yRu/2F0ugbXSXBfCgX+j2PvsidTTf19iNrJr2PaUIpOms SqDm0sX/zWX730I2k0g+OM6cIfTL1fRreZdG9QFWf7ybs76HB8Ue55J7he/hvtyURWqp EBwCMQI1mDSc55LCRtHlqEgIhw/GgQk/D3df3FS5TvmeQf1w7dE6mOrUsK+UYaFLDMc1 yfSlhi8YvKqShN5lgFN9uu/9OBrKuf3IvHec5eVFJe/4cS92K9d9AG/ODmmFJfuYpfuv s4RUraQ2vjbiVC0a05VxWCJ9VqpYQpQDaHTNtpAe7/LNH5BC3Hh7HgemvbZrkP/Lm5AZ kgQA== X-Gm-Message-State: AGRZ1gIybpaLdLtfA2pilVcXpe9FjipfUZOHCh5cfddY4g/PBW6V0Psz cfD5UYlznGYF+xnj6I9Gb3El9U78Zd2fjg+uAerKgqQskLZZVQ3Ioz/doFQumsrPziDli1QAOL+ xK3BesFZ8wg2MZUtp2RswxYF+l9EvV9/jQWY3GWVIW2AQXZwBVahLCDxKNPuMdaSROlBW26ugQV dPyS6k7HUEzMRwUn/8scGvkjt34/z6F1nms62B0ByF05XXCRmENlZF/2cqbFSXBqhqWy9dtD0vD M89nB6IDNYDEhqA/9yqdDgqsRJmTzTt1A1T192i48ZX6Si+b0xnOLVOTG2BU895ztvl7WARhKDW t8Ls+K6jjCGTBCOxVubfvfDCzUNx2uJLL0WAEQm2OUJb9vWvvQkxTleg8mpPfOE8pEzFL48HKDd 3 X-Received: by 2002:a17:902:6b87:: with SMTP id p7-v6mr3575744plk.282.1542082679697; Mon, 12 Nov 2018 20:17:59 -0800 (PST) X-Received: by 2002:a17:902:6b87:: with SMTP id p7-v6mr3575714plk.282.1542082678886; Mon, 12 Nov 2018 20:17:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542082678; cv=none; d=google.com; s=arc-20160816; b=jTAO93Yn0Y/3BK7d3/2p+2I1RyF8tuDRjQmZ+F+TP0Srv9vRzavVpNtXu+9zo0Xw5z a/4Fit6tHVgqbrn/7o2fvPflU6qFxLiH1LDtaFFoNagEgxSzjXnGZMu43GsCau8PsqOq dyTHTCR878XeaA2WksZTvUwtXPTLTFzK+/cH/e+XkRI8Bc1C7taqXAGqdeEyy4D55d5h 0MNvhW0mOz195dGkymzGj8EJfwSVff5Xs53jsxBuN0HCkGFbvsrIGqy/SdVf+f8tnjuY uwcEmPW8AR4gKWGjshJsC0vySSqP4iH5Ni6sHQUbjkYoxXKR9sC8psLvHAuapklto5G8 l3LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=HMmJibSrAynUwKhby60Ri0xmOKkhaXCBIIErp75jOPI=; b=iwoPRQM8bVDdXdS5p3oEDapGN6m7iXwC2pJETO1BAWO152b4+k5nHiLX2fDEo/Poo+ MwTBbrwNNx4SOAvd06Fs06ssVUkfhTN+CLbDvb92OPT1cCud7NgmM0nFBfhophf/E4Xl 8Qfs94yO2ip7o6Uwmql58LNlmvyyNJOlDYFZipxMjxEuV9PXNbg0REwXS91y1Iu28oYA IE32qB/7EByZ2ogatXHdqHw2YAd49JFo2nnXhyG/1AB1kz7Gad8z4WB51zJTaxmsTXkB ZM/EaSx0c6upjbDhxkmfYlgb9FpUjkKV69TWaW8zvv+2XpJKXF0xl1WzbBBGaQUKjJd2 xkfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Me7d7TN7; spf=pass (google.com: domain of richard.weiyang@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s17-v6sor23003789pfi.2.2018.11.12.20.17.58 for (Google Transport Security); Mon, 12 Nov 2018 20:17:58 -0800 (PST) Received-SPF: pass (google.com: domain of richard.weiyang@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Me7d7TN7; spf=pass (google.com: domain of richard.weiyang@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=HMmJibSrAynUwKhby60Ri0xmOKkhaXCBIIErp75jOPI=; b=Me7d7TN7wq642HSYt7kw+FVCED9mN5O2CxVL+v3TYAcYX5mSJtRkLLdskLS+6kQdTM 0c45cvKs9IMwJTli/cRwJemlKlC747Q6SujFB41FTV1Ny3N5pbZb2OIHQWhdupbcp6J8 iLIFm6PervcoXJuIXSONlXL9wiCooYo/+Nfuet9Pnm1v+Kgo5A/Zy2e7Xch054NeKN3j OdktjtaMwDJD8gvoByR+Ju9KZR6dEnh+3qDTt9qb4ftCrUvCDxMo5v1cOQmeSvGAeeiN z/ME18GRnIqmBCErU3Y+oY6/UIADHY0OxGDRIG4oYC4uN6H6wLAHgP8OiWIvZS3pRDz+ Z/nw== X-Google-Smtp-Source: AJdET5dl1V8Tyo+49fWpnwcvKUCswULvBwK6JkBZrW6qUwNXeKqEbjEz8giU0HZptCqrxtB4rCToJg== X-Received: by 2002:a62:a511:: with SMTP id v17-v6mr3587937pfm.18.1542082678372; Mon, 12 Nov 2018 20:17:58 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id w10sm9793279pgi.81.2018.11.12.20.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 20:17:57 -0800 (PST) From: Wei Yang To: akpm@linux-foundation.org, mgorman@techsingularity.net Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n Date: Tue, 13 Nov 2018 12:17:50 +0800 Message-Id: <20181113041750.20784-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.15.1 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 Commit fa5e084e43eb ("vmscan: do not unconditionally treat zones that fail zone_reclaim() as full") changed the return value of node_reclaim(). The original return value 0 means NODE_RECLAIM_SOME after this commit. While the return value of node_reclaim() when CONFIG_NUMA is n is not changed. This will leads to call zone_watermark_ok() again. This patch fix the return value by adjusting to NODE_RECLAIM_NOSCAN. Since it is not proper to include "mm/internal.h", just hard coded it. Signed-off-by: Wei Yang --- This doesn't effect the system functionally. I am not sure we need to cc to stable tree? --- include/linux/swap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index d8a07a4f171d..2bd993280470 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -364,7 +364,7 @@ extern int node_reclaim(struct pglist_data *, gfp_t, unsigned int); static inline int node_reclaim(struct pglist_data *pgdat, gfp_t mask, unsigned int order) { - return 0; + return -2; /* NODE_RECLAIM_NOSCAN */ } #endif