Re: + include-linux-mmh-move-nr_free_buffer_pages-from-swaph-to-mmh.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> On Tue, Sep 14, 2021 at 08:37:47PM -0700, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> > ------------------------------------------------------
> > From: Mianhan Liu <liumh1@xxxxxxxxxxxxxxxxxxx>
> > 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?



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux