From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 18 Dec 2004 01:52:08 +0100 (CET) From: Roman Zippel Subject: Re: [patch] [RFC] make WANT_PAGE_VIRTUAL a config option In-Reply-To: <1103320106.7864.6.camel@localhost> Message-ID: References: <1103244171.13614.2525.camel@localhost> <1103246050.13614.2571.camel@localhost> <1103257482.13614.2817.camel@localhost> <1103299179.13614.3551.camel@localhost> <1103320106.7864.6.camel@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Dave Hansen Cc: Linux Kernel Mailing List , geert@linux-m68k.org, ralf@linux-mips.org, linux-mm List-ID: Hi, On Fri, 17 Dec 2004, Dave Hansen wrote: > > > No. But, I do think that most of the very basic VM structures do, as it > > > stands. That's limited to struct page, zone, and pgdat as I see it > > > now. > > > > Why do you want to put these into separate headers? > > It enables you do do static inlines accessing struct page members > anywhere you want, such as in asm/mmzone.h, like in my example. And by that you add more header dependencies. We have basically this situation: foo.h (struct foo; inline foo();) <-> bar.h (struct bar; inline bar();) Almost every time we had such recursive dependencies, we simply rip one element out and put it into a separate header: foo.h (inline foo();) -> bar.h (struct bar; inline bar();) -> foo_struct.h (struct foo;) Repeat this often enough and we end up with millions of small header files. Instead we can reorder everything a little and can do this: foo.h (inline foo(); inline bar();) -> foo_types.h (struct foo; struct bar;) In your case don't put the inline functions into asm/mmzone.h and we should merge the various definition into fewer header files. > > > The dependencies aren't very twisted at all. In fact, I don't think any > > > of those are deeper than two. More importantly, I never have to cope > > > with 'struct page;' keeping me from doing arithmetic. > > > > You may be surprised. :) > > Play around with "mkdir test; echo 'obj-y = test.o' > test/Makefile; echo > > '#include ' > test/test.c; make test/test.i > > CFLAGS_test.o=--trace-includes". > > I'm not sure what you're getting at. > > make: *** No rule to make target `test/test.i'. Stop. Sorry, I forgot to mention that you have to do this inside a kernel tree. bye, Roman -- 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: aart@kvack.org