From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-kbuild@vger.kernel.org,
Paul Gortmaker <paul.gortmaker@windriver.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 00/19] lib: Some #include cleanups
Date: Wed, 31 Dec 2014 02:21:35 +0100 [thread overview]
Message-ID: <1419988915-20730-1-git-send-email-linux@rasmusvillemoes.dk> (raw)
I'm contemplating doing some tree-wide spring cleaning, mostly
consisting of removing redundant includes, but also refactoring some
large and heterogeneous headers into smaller pieces.
This patch series consists of low-hanging fruit I picked from
lib/. I've verified that "objdump -d lib/builtin.o" produces identical
output for {allyes,allno,def}config, but this is of course only for
x86_64. There's a small but measurable build time improvement: A
defconfig build of lib/ from a clean tree is consistently .5 seconds
(2 %) faster with these patches. There are lots of other apparently
unused headers in lib/*.c, but I've only removed those where it
actually ends up disappearing from the .cmd dependency file (since
that's where the potential build gain lies, and helps prove that the
header is indeed redundant).
I expect there is much larger speedups to gain from removing includes
from .h files, but that is of course at the same time a huge can of
worms, involving boatloads of tree-wide patches updating users to
include what they use directly. So before I start doing that, I'd like
to hear if people think it would be futile.
Rasmus Villemoes (19):
lib/interval_tree.c: Simplify includes
lib/sort.c: Use simpler includes
lib/dynamic_queue_limits.c: Simplify includes
lib/halfmd4.c: Simplify includes
lib/idr.c: Remove redundant include
lib/genalloc.c: Remove redundant include
lib/list_sort.c: Rearrange includes
lib/md5.c: Simplify include
lib/llist.c: Remove redundant include
lib/kobject_uevent.c: Remove redundant include
lib/nlattr.c: Remove redundant include
lib/plist.c: Remove redundant include
lib/radix-tree.c: Change to simpler include
lib/show_mem.c: Remove redundant include
lib/sort.c: Move include inside #if 0
lib/stmp_device.c: Replace module.h include
lib/strncpy_from_user.c: Replace module.h include
lib/percpu_ida.c: Remove redundant includes
lib/lcm.c: Replace include
include/linux/cryptohash.h | 2 ++
lib/dynamic_queue_limits.c | 4 ++--
lib/genalloc.c | 1 -
lib/halfmd4.c | 2 +-
lib/idr.c | 1 -
lib/interval_tree.c | 4 ++--
lib/kobject_uevent.c | 1 -
lib/lcm.c | 2 +-
lib/list_sort.c | 7 +++++--
lib/llist.c | 1 -
lib/md5.c | 2 +-
lib/nlattr.c | 1 -
lib/percpu_ida.c | 3 ---
lib/plist.c | 1 -
lib/radix-tree.c | 2 +-
lib/show_mem.c | 1 -
lib/sort.c | 6 +++---
lib/stmp_device.c | 3 ++-
lib/strncpy_from_user.c | 3 ++-
19 files changed, 22 insertions(+), 25 deletions(-)
--
2.1.3
next reply other threads:[~2014-12-31 1:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-31 1:21 Rasmus Villemoes [this message]
2014-12-31 1:21 ` [PATCH 01/19] lib/interval_tree.c: Simplify includes Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 02/19] lib/sort.c: Use simpler includes Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 03/19] lib/dynamic_queue_limits.c: Simplify includes Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 04/19] lib/halfmd4.c: " Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 05/19] lib/idr.c: Remove redundant include Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 06/19] lib/genalloc.c: " Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 07/19] lib/list_sort.c: Rearrange includes Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 08/19] lib/md5.c: Simplify include Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 09/19] lib/llist.c: Remove redundant include Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 10/19] lib/kobject_uevent.c: " Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 11/19] lib/nlattr.c: " Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 12/19] lib/plist.c: " Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 13/19] lib/radix-tree.c: Change to simpler include Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 14/19] lib/show_mem.c: Remove redundant include Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 15/19] lib/sort.c: Move include inside #if 0 Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 16/19] lib/stmp_device.c: Replace module.h include Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 17/19] lib/strncpy_from_user.c: " Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 18/19] lib/percpu_ida.c: Remove redundant includes Rasmus Villemoes
2014-12-31 1:21 ` [PATCH 19/19] lib/lcm.c: Replace include Rasmus Villemoes
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=1419988915-20730-1-git-send-email-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
/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
all inboxes | Powered by JetHome®