Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4901280imu; Mon, 12 Nov 2018 20:20:12 -0800 (PST) X-Google-Smtp-Source: AJdET5dAdkV2HI5uZ7yKSYBbBvTaZxGTW66kzlbkUblSH2kOMnCqn4r3QWb4zCcwtdMTjbLpSJfp X-Received: by 2002:a62:6d07:: with SMTP id i7-v6mr3745483pfc.146.1542082812747; Mon, 12 Nov 2018 20:20:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542082812; cv=none; d=google.com; s=arc-20160816; b=naeGhkxiAlZ3HmURB2alx1KTTcdlRm/IwjaIFXJjSm43Kb/+kXb7vpqt5mEyJ/xfay gV6oJi50cSc4XyDhQM32W2WeglkdE/iFlVFh1HTeMB+DMNjBcBlRXe8uY8sCEKheXG60 fvD+7skN2NR+3D7pDjeqOMZAFhLxqxEorWW/0E+QYCP8eH9bz65C7Iyif8u+2L+i+xGy HUFYG70l2TrtgkeQDwLbEpoJ1WJQwDvYakBRK95u5DAjgsOOMc6zgHH6OMTjuUfLBfyI v5I9LedH4gcSb31zICYNJ4X4Fi2cIc3/lAjR6Mp48wTRtgb0cwg8k91K92wRgRFmcxca S0OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=HMmJibSrAynUwKhby60Ri0xmOKkhaXCBIIErp75jOPI=; b=lmMOWgBG9qGPNsgooOt6ADfaLDPsHtU85mBvnv/pwaXm9HkKvfLKdtDQu79R47o8Hm +mRBEqFtC4KgxSS2rEwuVYLjRZtNy6df/rLuw8IB79fU4gc/qiEumlKlujUeLq5/ZKUb S0zbspGo7KufS0huR5I0Y+3SvEpykeA0v+Jc5AKffCJ8NeFip0A4iANx19hgiSKV+iVg +1e5ekoIUyEd0+juYFEj7zxK4cQb0GkeNVO6fgsUK+cVYL3Tz3N2bGL4ZOnid01Qv+es TsEBMC76hlalX8mZShcTXnwMcIG6kAAAipl74sMN56bS1rBHYoqX/JhP7vILq+a1W2tv g4Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Me7d7TN7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t75-v6si21478508pfi.221.2018.11.12.20.19.55; Mon, 12 Nov 2018 20:20:12 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Me7d7TN7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729244AbeKMOON (ORCPT + 99 others); Tue, 13 Nov 2018 09:14:13 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42165 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbeKMOON (ORCPT ); Tue, 13 Nov 2018 09:14:13 -0500 Received: by mail-pg1-f195.google.com with SMTP id d72so1615681pga.9 for ; Mon, 12 Nov 2018 20:17:58 -0800 (PST) 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-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HMmJibSrAynUwKhby60Ri0xmOKkhaXCBIIErp75jOPI=; b=VPWGO8cswRESKMXHJd/uHqaqNfjbhHppsrfzrTJjYSyF7cNkTgzn03uUJZcxngvlhO r38KhAb7EcBDA/Nosxu8w7KHvgdZpkciFuaJ9ixbTo9iF8V/HXbB+CRgnt9pBvLmNXo9 xoqWths3MWc9twtw4ycKRzbzlpwGEfyhewO59E+wnLBHghdQ0W7ZPUdmDoiANUFcNp+y N5kKjqz7+7ReC6J7vt1RsyYUZjlowx+r/RkzZmDS1gJPx96XClEyydzSFbwYWqighRqh ZnlVkyyd77TFf4/owX9bSvBV6T/C5zY+EKewLE1SNqAXtAHy3G+UKl2eYqqH4zqJlOcG lE4A== X-Gm-Message-State: AGRZ1gISirnJBfGey+wfNfp4wR7ybQ3MNEkbbpRce2dIYylWa7neIqto UxTdb+D2W5L9V0kwlROjdnCy2bbg21E= 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.15.1