linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Wei Yang <richard.weiyang@gmail.com>
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
Date: Tue, 13 Nov 2018 05:32:43 -0800	[thread overview]
Message-ID: <20181113133243.GW21824@bombadil.infradead.org> (raw)
In-Reply-To: <20181113080436.22078-1-richard.weiyang@gmail.com>

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.

      parent reply	other threads:[~2018-11-13 13:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13  4:17 [PATCH] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n Wei Yang
2018-11-13  5:36 ` Matthew Wilcox
2018-11-13  7:49   ` Wei Yang
2018-11-13  8:04 ` [PATCH v2] " Wei Yang
2018-11-13 12:56   ` Michal Hocko
2018-11-13 13:18     ` Wei Yang
2018-11-13 13:04   ` Matthew Wilcox
2018-11-13 13:18     ` Wei Yang
2018-11-13 13:32   ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181113133243.GW21824@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=richard.weiyang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).