From: Roman Zippel <zippel@linux-m68k.org> To: Dave Hansen <haveblue@us.ibm.com> Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, geert@linux-m68k.org, ralf@linux-mips.org, linux-mm <linux-mm@kvack.org> Subject: Re: [patch] [RFC] make WANT_PAGE_VIRTUAL a config option Date: Sat, 18 Dec 2004 01:52:08 +0100 (CET) [thread overview] Message-ID: <Pine.LNX.4.61.0412180020220.793@scrub.home> (raw) In-Reply-To: <1103320106.7864.6.camel@localhost> 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 <linux/foo.h>' > 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
WARNING: multiple messages have this Message-ID (diff)
From: Roman Zippel <zippel@linux-m68k.org> To: Dave Hansen <haveblue@us.ibm.com> Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, geert@linux-m68k.org, ralf@linux-mips.org, linux-mm <linux-mm@kvack.org> Subject: Re: [patch] [RFC] make WANT_PAGE_VIRTUAL a config option Date: Sat, 18 Dec 2004 01:52:08 +0100 (CET) [thread overview] Message-ID: <Pine.LNX.4.61.0412180020220.793@scrub.home> (raw) In-Reply-To: <1103320106.7864.6.camel@localhost> 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 <linux/foo.h>' > 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2004-12-18 0:55 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-12-16 21:56 [patch] [RFC] make WANT_PAGE_VIRTUAL a config option Dave Hansen 2004-12-16 21:56 ` Dave Hansen 2004-12-17 0:36 ` Roman Zippel 2004-12-17 0:36 ` Roman Zippel 2004-12-17 0:42 ` Dave Hansen 2004-12-17 0:42 ` Dave Hansen 2004-12-17 0:51 ` Roman Zippel 2004-12-17 0:51 ` Roman Zippel 2004-12-17 1:14 ` Dave Hansen 2004-12-17 1:14 ` Dave Hansen 2004-12-17 2:50 ` Roman Zippel 2004-12-17 2:50 ` Roman Zippel 2004-12-17 4:24 ` Dave Hansen 2004-12-17 4:24 ` Dave Hansen 2004-12-17 13:26 ` Roman Zippel 2004-12-17 13:26 ` Roman Zippel 2004-12-17 15:59 ` Dave Hansen 2004-12-17 15:59 ` Dave Hansen 2004-12-17 20:27 ` Roman Zippel 2004-12-17 20:27 ` Roman Zippel 2004-12-17 21:48 ` Dave Hansen 2004-12-17 21:48 ` Dave Hansen 2004-12-18 0:52 ` Roman Zippel [this message] 2004-12-18 0:52 ` Roman Zippel 2004-12-20 14:49 ` Dave Hansen 2004-12-20 14:49 ` Dave Hansen 2004-12-20 20:45 ` Roman Zippel 2004-12-20 20:45 ` Roman Zippel 2004-12-17 2:01 ` Dave Hansen 2004-12-17 2:01 ` Dave Hansen
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=Pine.LNX.4.61.0412180020220.793@scrub.home \ --to=zippel@linux-m68k.org \ --cc=geert@linux-m68k.org \ --cc=haveblue@us.ibm.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=ralf@linux-mips.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.