Messages in this thread | | | Date | Tue, 17 Oct 2006 09:12:50 -0600 | From | Ray Lehtiniemi <> | Subject | Bogus deps checking (was Re: [RFC] typechecking for get_unaligned/put_unaligned) |
| |
On Monday 16 October 2006 22:37, Al Viro wrote: > FWIW, that reminds me - I ought to resurrect the > patchset killing bogus dependencies; I modified sparse to collect stats > on how many times each #include actually pulls a header during build, > added those to data on dependencies (from .cmd.*) and got interesting > results.
are these modifications publically available? i would be interested to see them. i've been grovelling over the header files with perl...
> There are several #includes with very high impact; the worst happens > to be module.h -> sched.h, followed by several includes of fs.h. These > turned out to be easy to kill (i.e. few places actually needed compensatory > #include added) and that had seriously cut down on total dependencies. > The patches will need to be redone due to bitrot, but they are not > hard to reproduce. The really interesting observation is that such > high-impact includes exist and can be found by this technics...
i noticed another potential source of unneccessary dependencies: <linux/prefetch.h> includes <asm/processor.h> for a total of ~49 dependencies. it appears that the prefetch() concept could be moved into a separate <asm/prefetch.h> file with much smaller dependency footprint, for a pretty hefty reduction in total dependencies throughout the system.
another potential win: a good chunk of <linux/kernel.h> (which has ~24 dependencies) actually has nothing to do with the kernel per se. i'm thinking of basic C language idioms (container_of(), typecheck(), etc) and constants (INT_MAX). a fair number of files seem to include <linux/kernel.h> just for these items. moving that stuff into a separate file (<linux/c.h>?) could eliminate 20 or more bogus deps from many locations.
ray - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |