Re: [patch] [RFC] make WANT_PAGE_VIRTUAL a config option
From: Roman Zippel
Date: Thu Dec 16 2004 - 21:53:52 EST
On Thu, 16 Dec 2004, Dave Hansen wrote:
> > Could you explain a bit more, what exactly the problem is?
> The symptom is that you'll add some new function to a header, say
> mmzone.h. You get some kind of compile error that a structure that you
> need is not fully defined (usually because it is predeclared "struct
> foo;"). This happens when you do either a structure dereference on a
> pointer, or do some other kind of pointer arithmetic on it outside of a
I know this problem and I hoped you would provide a complete header
dependency example. Anyway, I'm not against fixing this, I think that
you're starting somewhere in the middle.
We have the same problem with core data types, like atomic_t, spinlocks,
semaphores... Preempt made this problem worse and was "fixed" by
separating some stuff into thread_info.
I'd prefer to fix this problem at the core first, some time ago I posted a
few patches to separate out core data structures from the functions. This
allows further cleanups, I just did a quick check with linux/mm.h and
easily reduced the dependencies by half. I need to update the patches
soon, so there are ready once 2.6.10 is out.
If you change the header dependencies, there is a big risk you break some
architecture, the current system is rather fragile. Moving a random
structure into a new header file doesn't always fix the problem, this
structure might still need some other definitions and so can pull in
different headers on every arch. Splitting a header is easy, getting the
whole thing working again in the end is the hard part.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/