Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4953429imu; Mon, 12 Nov 2018 21:38:13 -0800 (PST) X-Google-Smtp-Source: AJdET5eNpZCL4i3NFDxlYukyLgasNIxlkIxFKb+k1/1eUtPZHYztHaAOI7eeSiv7pBcOaDE3MOtM X-Received: by 2002:a63:588:: with SMTP id 130mr3445144pgf.273.1542087493303; Mon, 12 Nov 2018 21:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542087493; cv=none; d=google.com; s=arc-20160816; b=oNrTRCsl1NlZKe2hCE9PtOhwpZZkxfHlC+Knj5+Fqgu6hrXeXRMZn1HhwBKUIcabge Thwx3yFCNtZUhYBfpx4O1ou+EBkijkUS8etELH0plDms30yxlgSXVpU7AO1G4A0FFyZz jv72qJi6owJ7VGHXoox3mtX84LX/kAyvLHPJ+7T5bybw6RkrE4pRetNjc4xTISUIzD3u ddlXDSdb6vlo/I9CvIFln1fxnEru4R13unJQv4trS5XCXeqXMxMVmVqrkQv+9VGiHG9m 0bp6Nc4p41lk1DurabVUEyy8DiT0ZsY036pzo7wp/Mcw+sslCcR0zYbkdsb2J1Sl8z4a GUwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N8uvS0b4HRhoP90Kw3F4LGE63nyTHAen9aZ/M3o74Ek=; b=Sv/+LlxBxEdPzV8mFH81zo7vmRYFmHw7CortVQequNzveqI6YqAVItGOCeb9jxDMRW TyH9ydH1R2sCaIXGPEb900cFML0RHy9GG3Qv4RcS5Dn8SUb0H4pMStqwf6p0mgF3PHYP mo5PB7dLuAmW6ilVT4RUXNQd8QXHWSGbcLPjq8bE6DkQ9RlVkgvgGhrOP//FO4O0xWlK ah6MY8R9uRh030XuxNHYtZDs1XYmqCw2/B4KHm6KqNEugOvw+6qHGjSC1+UEnedMlajA 9nXVjksQGhT3UU+x/vIShpJZiFCHmZfKCeR+/QqIrvspGfkMPt/tzj2mnT7u+p/tmRTR ctrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=I7E4lcma; 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 r199-v6si25947682pfr.105.2018.11.12.21.37.57; Mon, 12 Nov 2018 21:38:13 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=I7E4lcma; 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 S1730828AbeKMPco (ORCPT + 99 others); Tue, 13 Nov 2018 10:32:44 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:38004 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727357AbeKMPco (ORCPT ); Tue, 13 Nov 2018 10:32:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=N8uvS0b4HRhoP90Kw3F4LGE63nyTHAen9aZ/M3o74Ek=; b=I7E4lcmaGE+ZO/GHFF5TPwdtr jUx0eT9XCXRtXvwBzWlHWT+2isHpry0LfTv2YggxyNZ+UMxhISlBVz5kDnXv7xgC+8mX/OCOI9xhA OQ2Bv26odrTjn0pQECkaiHx97HBYvEBgTohqTK/PbDzvU7vc6cSrpGKarlRfHQDKGEvPrkNa7YrC7 H5BkvfTX5HE8dPadXodVWLV5lRBWjI4plGd+kXvGUruhnpMYW+8o7fMo+yoz37ZnFtus8dIs1yDD7 Jt+2gMRKpIc4xwSJKVhTNoorG85IBeAGo89gA9sOueNTdKuBKJryIDl5LrlvX78zdm2sYNBYLEwHq uv/O7mYqg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMRN1-0007zk-UZ; Tue, 13 Nov 2018 05:36:15 +0000 Date: Mon, 12 Nov 2018 21:36:15 -0800 From: Matthew Wilcox To: Wei Yang Cc: akpm@linux-foundation.org, mgorman@techsingularity.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n Message-ID: <20181113053615.GJ21824@bombadil.infradead.org> References: <20181113041750.20784-1-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181113041750.20784-1-richard.weiyang@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 13, 2018 at 12:17:50PM +0800, Wei Yang wrote: > 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. Since the return value is defined in mm/internal.h that means no code outside mm/ can call node_reclaim (nor should it). So let's move both of node_reclaim's declarations to mm/internal.h instead of keeping them in linux/swap.h.