Bogus deps checking (was Re: [RFC] typechecking for get_unaligned/put_unaligned)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux