All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/7] kernel.h further split
@ 2021-10-07 15:44 Andy Shevchenko
  2021-10-07 15:44 ` [PATCH v4 1/7] kernel.h: Drop unneeded <linux/kernel.h> inclusion from other headers Andy Shevchenko
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Andy Shevchenko @ 2021-10-07 15:44 UTC (permalink / raw)
  To: Brendan Higgins, Andy Shevchenko, Peter Zijlstra,
	Thomas Gleixner, linux-kernel, linux-kselftest, kunit-dev,
	linux-media
  Cc: Ingo Molnar, Will Deacon, Waiman Long, Boqun Feng, Sakari Ailus,
	Laurent Pinchart, Mauro Carvalho Chehab, Andrew Morton,
	Miguel Ojeda, jic23, linux, Thorsten Leemhuis

v3: https://lore.kernel.org/linux-media/20211007150339.28910-1-andriy.shevchenko@linux.intel.com/T/#u
v2: https://lore.kernel.org/linux-media/20211007095129.22037-1-andriy.shevchenko@linux.intel.com/T/#u

The kernel.h is a set of something which is not related to each other
and often used in non-crossed compilation units, especially when drivers
need only one or two macro definitions from it.

Here is the split of container_of(). The goals are the following:
- untwist the dependency hell a bit
- drop kernel.h inclusion where it's only used for container_of()
- speed up C preprocessing.

The build speedup is
	1.83% (ccache approach, see v2 cover letter for the details)
	0.5%  (kcbench approach, see v3 cover letter for the details)

In v4:
- dropped kobject.h change (Greg)
- Cc'ed more people (as per v1)

In v3:
- split patch 2 to more patches (Greg)
- excluded C changes (Herbert, Greg)
- measured with kcbench, see below (Greg)

Andy Shevchenko (7):
  kernel.h: Drop unneeded <linux/kernel.h> inclusion from other headers
  kernel.h: Split out container_of() and typeof_member() macros
  kunit: Replace kernel.h with the necessary inclusions
  list.h: Replace kernel.h with the necessary inclusions
  llist: Replace kernel.h with the necessary inclusions
  plist: Replace kernel.h with the necessary inclusions
  media: entity: Replace kernel.h with the necessary inclusions

 include/kunit/test.h         | 14 ++++++++++++--
 include/linux/container_of.h | 37 ++++++++++++++++++++++++++++++++++++
 include/linux/kernel.h       | 31 +-----------------------------
 include/linux/list.h         |  6 ++++--
 include/linux/llist.h        |  4 +++-
 include/linux/plist.h        |  5 ++++-
 include/linux/rwsem.h        |  1 -
 include/linux/spinlock.h     |  1 -
 include/media/media-entity.h |  3 ++-
 9 files changed, 63 insertions(+), 39 deletions(-)
 create mode 100644 include/linux/container_of.h

-- 
2.33.0


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

end of thread, other threads:[~2021-10-11  9:07 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 15:44 [PATCH v4 0/7] kernel.h further split Andy Shevchenko
2021-10-07 15:44 ` [PATCH v4 1/7] kernel.h: Drop unneeded <linux/kernel.h> inclusion from other headers Andy Shevchenko
2021-10-07 15:44 ` [PATCH v4 2/7] kernel.h: Split out container_of() and typeof_member() macros Andy Shevchenko
2021-10-07 15:54   ` Miguel Ojeda
2021-10-07 16:08     ` Andy Shevchenko
2021-10-07 16:27   ` Joe Perches
2021-10-07 16:47     ` Andy Shevchenko
2021-10-11  9:07     ` David Laight
2021-10-07 15:44 ` [PATCH v4 3/7] kunit: Replace kernel.h with the necessary inclusions Andy Shevchenko
2021-10-07 15:44 ` [PATCH v4 4/7] list.h: " Andy Shevchenko
2021-10-07 16:16   ` Jonathan Cameron
2021-10-07 16:21     ` Andy Shevchenko
2021-10-07 16:22       ` Andy Shevchenko
2021-10-07 17:29     ` Laurent Pinchart
2021-10-09  0:59       ` Joe Perches
2021-10-09  1:21         ` Laurent Pinchart
2021-10-07 15:44 ` [PATCH v4 5/7] llist: " Andy Shevchenko
2021-10-07 15:44 ` [PATCH v4 6/7] plist: " Andy Shevchenko
2021-10-07 17:12   ` Joe Perches
2021-10-07 17:19     ` Andy Shevchenko
2021-10-07 17:26       ` Joe Perches
2021-10-07 17:32         ` Andy Shevchenko
2021-10-07 17:46           ` Joe Perches
2021-10-07 15:44 ` [PATCH v4 7/7] media: entity: " Andy Shevchenko
2021-10-07 16:50   ` Sakari Ailus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.