linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: ekonijn@xs4all.nl
Cc: Christoph Hellwig <hch@infradead.org>, Dave Jones <davej@suse.de>,
	kernel-janitor-discuss@lists.sourceforge.net, linux-mm@kvack.org
Subject: Re: page-flags.h
Date: Fri, 03 May 2002 16:06:05 -0700	[thread overview]
Message-ID: <3CD317DD.2C9FBD11@zip.com.au> (raw)
In-Reply-To: <200205032241.g43MfC39082721@smtpzilla1.xs4all.nl>

Erik van Konijnenburg wrote:
> 
> Hi Andrew,
> 
> Do you really have to edit 119 files if you just want to avoid
> processing the PageFoo macros?  Include page-flags.h in pagemap.h,
> and you only have to add include lines to 13 files to get the kernel
> compiled, while still getting rid of 1050 times reading of page-flags.h.
> 
> Motivation:
>     --  linux/mm.h is included in 1163 files
>     --  linux/pagemap.h is included in only 109 files.
>     --  In pagemap.h, wait_on_page_locked() and PageLocked()
>         are mixed rather awkwardly.  Moving wait_on_page_locked()
>         to page-flags.h as you suggested doesn't really help:
>         you'd have to move the ___wait_on_page_locked declaration
>         as well, resulting in other ugliness, so we might as well
>         include page-flags.h.
>     --  most of the added includes are for page-flags.h, so it makes
>         sense not to merge page-flags.h and pagemap.h.
>     --  yes, the number 1050 is wrong, since pagemap.h is also
>         included indirectly.  I'm not sufficiently familiar with
>         the kernel to make a better estimate, so this whole
>         thing may be a red herring.
> 

I guess so.  Certainly, not having to alter that many files
is a bonus.

Part of my uncertainty here is that we just don't seem to
have a "plan".  Is the objective to completely flatten
the include heirarchy, no nested includes, and make all
.c files include all headers to which they (and their included
headers) refer?

That's pretty aggressive, but I think it's the only sane
objective.

BTW,


akpm-1:/usr/src/25> grep pagemap.h include/linux/*.h
include/linux/blkdev.h:#include <linux/pagemap.h>
include/linux/locks.h:#include <linux/pagemap.h>
include/linux/nfs_fs.h:#include <linux/pagemap.h>
include/linux/smb_fs.h:#include <linux/pagemap.h>

These need to be pulled out first.  locks.h and blkdev.h
really don't need the include at all.  page.h
would suffice.

And locks.h can just be deleted from the kernel.  Move
its two definitions into fs.h.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

  reply	other threads:[~2002-05-03 23:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020501192737.R29327@suse.de>
2002-05-01 17:34 ` page-flags.h Christoph Hellwig
2002-05-01 18:04   ` page-flags.h Dave Jones
2002-05-03  2:52     ` page-flags.h Andrew Morton
2002-05-03  8:24       ` page-flags.h Christoph Hellwig
2002-05-03 22:41       ` page-flags.h Erik van Konijnenburg
2002-05-03 23:06         ` Andrew Morton [this message]
2002-05-03 23:39           ` page-flags.h Dave Jones
2002-05-04  6:46             ` page-flags.h Erik van Konijnenburg
2002-05-14 20:25               ` page-flags.h Andrew Morton
2002-05-15 12:38                 ` page-flags.h Christoph Hellwig
2002-08-29 19:04                 ` page-flags.h Daniel Phillips

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=3CD317DD.2C9FBD11@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=davej@suse.de \
    --cc=ekonijn@xs4all.nl \
    --cc=hch@infradead.org \
    --cc=kernel-janitor-discuss@lists.sourceforge.net \
    --cc=linux-mm@kvack.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