Linux MM tree latest commits
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: davem@davemloft.net, horms@verge.net.au, kuba@kernel.org,
	liumh1@shanghaitech.edu.cn, marcelo.leitner@gmail.com,
	mm-commits@vger.kernel.org, pshelar@ovn.org,
	ulf.hansson@linaro.org, vyasevich@gmail.com
Subject: Re: + include-linux-mmh-move-nr_free_buffer_pages-from-swaph-to-mmh.patch added to -mm tree
Date: Sun, 19 Sep 2021 15:38:50 -0700	[thread overview]
Message-ID: <20210919153850.6a4d71f155ea725e913e0450@linux-foundation.org> (raw)
In-Reply-To: <YUbPNoDr/YHNDy4l@casper.infradead.org>

On Sun, 19 Sep 2021 06:48:38 +0100 Matthew Wilcox <willy@infradead.org> wrote:

> On Tue, Sep 14, 2021 at 08:37:47PM -0700, akpm@linux-foundation.org wrote:
> > ------------------------------------------------------
> > From: Mianhan Liu <liumh1@shanghaitech.edu.cn>
> > Subject: include/linux/mm.h: move nr_free_buffer_pages from swap.h to mm.h
> > 
> > nr_free_buffer_pages could be exposed through mm.h instead of swap.h.  The
> > advantage of this change is that it can reduce the obsolete includes.  For
> > example, net/ipv4/tcp.c wouldn't need swap.h any more since it has already
> > included mm.h.  Similarly, after checking all the other files, it comes
> > that tcp.c, udp.c meter.c ,...  follow the same rule, so these files can
> > have swap.h removed too.
> > 
> > Moreover, after preprocessing all the files that use nr_free_buffer_pages,
> > it turns out that those files have already included mm.h.Thus, we can move
> > nr_free_buffer_pages from swap.h to mm.h safely.  This change will not
> > affect the compilation of other files.
> 
> i don't think that moving more crap into mm.h is an improvement.
> if anything, we should be moving more things out of mm.h.

nr_free_buffer_pages() is part of the page allocation API and gfp.h
seems a more appropriate place for its declaration.

I expect this would also permit a reduction in the #include sprawl?

  reply	other threads:[~2021-09-19 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  3:37 + include-linux-mmh-move-nr_free_buffer_pages-from-swaph-to-mmh.patch added to -mm tree akpm
2021-09-19  5:48 ` Matthew Wilcox
2021-09-19 22:38   ` Andrew Morton [this message]
2021-09-19 22:57     ` Matthew Wilcox

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=20210919153850.6a4d71f155ea725e913e0450@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=horms@verge.net.au \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liumh1@shanghaitech.edu.cn \
    --cc=marcelo.leitner@gmail.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=pshelar@ovn.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vyasevich@gmail.com \
    --cc=willy@infradead.org \
    /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