From: Ray Lehtiniemi <rayl@mail.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Bogus deps checking (was Re: [RFC] typechecking for get_unaligned/put_unaligned)
Date: Tue, 17 Oct 2006 09:12:50 -0600 [thread overview]
Message-ID: <200610170912.51273.rayl@mail.com> (raw)
In-Reply-To: <20061017043726.GG29920@ftp.linux.org.uk>
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
next prev parent reply other threads:[~2006-10-17 15:13 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-17 0:50 [RFC] typechecking for get_unaligned/put_unaligned Al Viro
2006-10-17 1:50 ` Linus Torvalds
2006-10-17 4:37 ` Al Viro
2006-10-17 15:12 ` Ray Lehtiniemi [this message]
2006-10-17 15:24 ` Linus Torvalds
2006-10-18 4:40 ` dealing with excessive includes Al Viro
2006-10-18 9:19 ` Alexey Dobriyan
2006-10-18 9:31 ` Al Viro
2006-10-18 10:00 ` Alexey Dobriyan
2006-10-18 17:42 ` Al Viro
2006-10-18 21:48 ` Alexey Dobriyan
2006-10-18 15:04 ` Linus Torvalds
2006-10-18 15:13 ` Matthew Wilcox
2006-10-18 16:06 ` Al Viro
2006-10-18 16:32 ` Linus Torvalds
2006-10-18 17:44 ` Al Viro
2006-10-19 16:23 ` Al Viro
2006-10-19 18:24 ` Andreas Gruenbacher
2006-10-20 0:53 ` Al Viro
2006-10-20 0:57 ` Al Viro
2006-10-20 12:43 ` Matthew Wilcox
2006-10-20 0:58 ` Al Viro
2006-10-20 0:59 ` Al Viro
2006-10-20 1:02 ` Al Viro
2006-10-20 4:35 ` Randy Dunlap
2006-10-20 9:26 ` Stefan Richter
2006-10-20 16:13 ` Randy Dunlap
2006-10-20 17:51 ` Stefan Richter
2006-10-22 17:58 ` Geert Uytterhoeven
2006-10-22 22:59 ` Andi Kleen
2006-10-23 8:29 ` Geert Uytterhoeven
2006-10-23 16:09 ` Linus Torvalds
2006-10-23 16:13 ` Geert Uytterhoeven
2006-10-23 16:31 ` Linus Torvalds
2006-10-23 16:52 ` Geert Uytterhoeven
2006-10-23 17:05 ` Linus Torvalds
2006-10-23 0:31 ` Matthew Wilcox
2006-10-23 0:42 ` Andi Kleen
2006-10-23 1:08 ` Matthew Wilcox
2006-10-23 1:31 ` Andi Kleen
2006-10-23 1:36 ` Matthew Wilcox
2006-10-23 1:41 ` Andi Kleen
2006-10-23 8:34 ` Geert Uytterhoeven
2006-10-23 1:48 ` Randy Dunlap
2006-10-23 1:49 ` Nick Piggin
2006-10-23 6:34 ` Stefan Richter
2006-10-18 16:15 ` Jan Engelhardt
2006-10-18 16:21 ` Matthew Wilcox
2006-10-18 5:42 ` [RFC] typechecking for get_unaligned/put_unaligned Dave Jones
2006-10-18 6:05 ` Al Viro
2006-10-19 16:52 ` Denis Vlasenko
2006-10-19 16:58 ` Al Viro
2006-10-17 9:04 ` David Howells
2006-10-17 15:28 ` Linus Torvalds
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=200610170912.51273.rayl@mail.com \
--to=rayl@mail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox