Re: [patch] [RFC] make WANT_PAGE_VIRTUAL a config option

From: Dave Hansen
Date: Thu Dec 16 2004 - 19:48:32 EST

On Thu, 2004-12-16 at 16:36, Roman Zippel wrote:
> On Thu, 16 Dec 2004, Dave Hansen wrote:
> > I'm working on breaking out the struct page definition into its
> > own file. There seem to be a ton of header dependencies that
> > crop up around struct page, and I'd like to start getting rid
> > of thise.
> Why do you want to move struct page into a separate file?

Circular header dependencies suck :)

I posted another patch, shortly after the one that I cc'd you on, with
the following description. Cristoph suggested just making it
linux/page.h and maybe combining it with page-flags.h, but otherwise the
idea remains the same.

> There are currently 24 places in the tree where struct page is
> predeclared. However, a good number of these places also have to
> do some kind of arithmetic on it, and end up using macros because
> static inlines wouldn't have the type fully defined at
> compile-time.
> But, in reality, struct page has very few dependencies on outside
> macros or functions, and doesn't really need to be a part of the
> header include mess which surrounds many of the VM headers.
> So, put 'struct page' into structpage.h, along with a nasty comment
> telling everyone to keep their grubby mitts out of the file.
> Now, we can use static inlines for almost any 'struct page'
> operations with no problems, and get rid of many of the
> predeclarations.

-- Dave

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at