mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/19] lib: Some #include cleanups
@ 2014-12-31  1:21 Rasmus Villemoes
  2014-12-31  1:21 ` [PATCH 01/19] lib/interval_tree.c: Simplify includes Rasmus Villemoes
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Rasmus Villemoes @ 2014-12-31  1:21 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Rasmus Villemoes, linux-kbuild, Paul Gortmaker, linux-kernel

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


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-12-31  1:27 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-31  1:21 [PATCH 00/19] lib: Some #include cleanups Rasmus Villemoes
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

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®