Thread (15 messages) 15 messages, 2 authors, 2004-12-20

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

From: Dave Hansen <hidden>
Date: 2004-12-17 00:44:16
Also in: lkml

On Thu, 2004-12-16 at 16:36, Roman Zippel wrote:
On Thu, 16 Dec 2004, Dave Hansen wrote:
quoted
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, 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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help