Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5366104imu; Tue, 13 Nov 2018 05:33:35 -0800 (PST) X-Google-Smtp-Source: AJdET5eAOljRgCzXbZAMjZzSIS5X+3uHI4EDYSQ830XDlk70EMle4aXNOonpp5bSVmfBvCtlk0Aj X-Received: by 2002:a17:902:4025:: with SMTP id b34-v6mr5185238pld.318.1542116015398; Tue, 13 Nov 2018 05:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542116015; cv=none; d=google.com; s=arc-20160816; b=eB4Fq/vJTtVUyLiq2HpPuezaCWzr114NWNoFmJ6lL/imbz8lu/5RMWNzGxywpaur1u 88fZK3CFRtb0LjTlUe/XqBMP8dzDIh84iGXUk7b37wlIUUxfZNwFFvQu+Bg6tztTkuM1 m/oBv/dRZrsWHGcbXo/YN3KFFUOoJD7V1NilJpf7Z6SX5Lym1EmUyhd8xWnUq1sEwMlj odzS/2aPSLkaqXLONyrf3oktIiWS+3oMZ7mynkdgAhkn/jXu5bTEaaAFsgkn64899obi ydLrGuS+kV/Lsh/UHFowTBwfmwF2Vnhe8UoAPhNbpRExAktQlNKRq6DSrGiV5bbWfmGL HVLA== 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=sRyBSVNzLwzHrFetxFMjdbVTz4W6h9t5a0Cz5J+ZU44=; b=Q+xgD+86dUjthhGOZpAnaNzpdM2Ioc86CTPpkWgYIqYuOqM4+sqXcdhlsoZVizfwEQ dLYuH7xj/lQMZCFGll04FST+Lg4AoQkAUZusGzGJiKNPIMqW9lBM2tut4845bWdWm22x rt8sh+7YNZ59UFdaofdM3PYySnkf5A3My9wWsE5mwhjCM8s3K1HOwpCWksju/6AXsfkb EXW2VNZRSX70H/cSq8ru1h6D9H5L3OtcqzoLBSVF/iO+VTmxb6GwKhvaImkMyKCvEYw9 Nw7sMqxux/rTRFxn6UZAI6eo2X26tMv4x7D2f7ByXEo1dHWbD6W6ExtzlZCkWmtKEIL7 jsVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=dGmLxfl9; 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 h5-v6si22836000pfg.226.2018.11.13.05.33.19; Tue, 13 Nov 2018 05:33:35 -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=dGmLxfl9; 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 S2387555AbeKMXax (ORCPT + 99 others); Tue, 13 Nov 2018 18:30:53 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:39436 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733229AbeKMXax (ORCPT ); Tue, 13 Nov 2018 18:30:53 -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=sRyBSVNzLwzHrFetxFMjdbVTz4W6h9t5a0Cz5J+ZU44=; b=dGmLxfl9fwJbG1TsiXKQPvZKg 7TGNa1PvCapR+J5Cjlbk91mh69fLKrAocJ6O9M6hD41dYfdGcGw4fUQc9OQ5CSoMcedNRs+LVR4Hx OOH806kAf3FU606VhFNhlOPvtC2JgYKVx5YGp1OMHTWJQSYMPl/sxA8mDoQPj175/x08NBaq/BpBA eoWcihQgCqoFYAOTZWi3ooeYwKUS2Wzp4DhrX3Fh3WUVFuOnyYrve6tFQc2n0hr9mhPzWFU7tdeDh /WdRyzgCekp1je+KpoB+GP3ZFX74I0YH2bf1vMAGp0t31QCiwZjVFafNuXhVr9VqUYB3diie/Pt2n 1Eqh/2WPg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMYo7-0002I0-P3; Tue, 13 Nov 2018 13:32:43 +0000 Date: Tue, 13 Nov 2018 05:32:43 -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 v2] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n Message-ID: <20181113133243.GW21824@bombadil.infradead.org> References: <20181113041750.20784-1-richard.weiyang@gmail.com> <20181113080436.22078-1-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181113080436.22078-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 04:04:36PM +0800, Wei Yang wrote: > This patch fix the return value by adjusting to NODE_RECLAIM_NOSCAN. Since > node_reclaim() is only called in page_alloc.c, move it to mm/internal.h. linux/swap.h is included in quite a few places in the kernel, but let's see what's really used from it outside mm/ SWAP_FLAG* -- only used in mm/swapfile.c. Move to swapfile.c? current_is_kswapd() -- used by some drivers. MAX_SWAPFILES* -- used by arch code. union swap_header -- used by mtdswap. struct reclaim_state -- used by fs/inode.c. struct swap_extent -- embedded in swap_info_struct, which is used widely. struct swap_cluster_info -- ditto struct vma_swap_readahead -- only used in swap_state.c. Move it there? nr_free_pages() -- used in fs/ and kernel/power/swap.c totalram_pages -- used widely totalreserve_pages -- used widely vm_swappiness -- used by sysctl vm_total_pages -- only used in mm -- move to mm/internal.h? node_reclaim_mode -- used by sysctl kswapd_run -- only used in mm kswapd_stop -- ditto swap_address_space -- only used in mm swapper_spaces -- likewise SWAP_ADDRESS_SPACE* --likewise I haven't covered all of the file, but there's definitely opportunity for some followup patches to shrink linux/swap.h.