linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/50] big header dependency cleanup targeting sched.h
@ 2023-12-16  2:47 Kent Overstreet
  2023-12-16  2:47 ` [PATCH 01/50] drivers/gpu/drm/i915/i915_memcpy.c: fix missing includes Kent Overstreet
                   ` (13 more replies)
  0 siblings, 14 replies; 95+ messages in thread
From: Kent Overstreet @ 2023-12-16  2:47 UTC (permalink / raw)
  To: linux-kernel, linux-mm, linux-fsdevel
  Cc: Kent Overstreet, tglx, x86, tj, peterz, mathieu.desnoyers,
	paulmck, keescook, dave.hansen, mingo, will, longman, boqun.feng,
	brauner

the issue being targeted here is that sched.h is entirely too much of an
everything header, and a nexus of recursive header dependencies.

the main strategy is to try to only pull type definitions into sched.h,
by splitting out *_types.h versions of sched.h dependencies, and
secondarily moving code out of sched.h into more appropriate locations.

this patchset does not go quite as far as I would have liked;
arch/x86/include/asm/processor.h also pulls in way too much, and I would
like to also split out a _types.h version for that, but that would
entail changing every arch's version of that header and I'm not going to
tackle that yet.

if we do get that done, the number of headers pulled in by sched.h will
be cut approximately in half (from well over 300 to 170-180) on an
allyesconfig.

build tested on x86, still needs build testing on other archs

https://evilpiepirate.org/git/bcachefs.git/log/?h=header_cleanup

Kent Overstreet (49):
  drivers/gpu/drm/i915/i915_memcpy.c: fix missing includes
  x86/kernel/fpu/bugs.c: fix missing include
  x86/lib/cache-smp.c: fix missing include
  x86/include/asm/debugreg.h: fix missing include
  x86/include/asm/paravirt_types.h: fix missing include
  task_stack.h: add missing include
  nsproxy.h: add missing include
  kernel/fork.c: add missing include
  kmsan: add missing types.h dependency
  time_namespace.h: fix missing include
  nodemask: Split out include/linux/nodemask_types.h
  prandom: Remove unused include
  timekeeping: Kill percpu.h dependency
  arm64: Fix circular header dependency
  kernel/numa.c: Move logging out of numa.h
  sched.h: Move (spin|rwlock)_needbreak() to spinlock.h
  ktime.h: move ktime_t to types.h
  hrtimers: Split out hrtimer_types.h
  locking/mutex: split out mutex_types.h
  posix-cpu-timers: Split out posix-timers_types.h
  locking/seqlock: Split out seqlock_types.h
  pid: Split out pid_types.h
  sched.h: move pid helpers to pid.h
  plist: Split out plist_types.h
  rslib: kill bogus dependency on list.h
  timerqueue: Split out timerqueue_types.h
  signal: Kill bogus dependency on list.h
  timers: Split out timer_types.h
  workqueue: Split out workqueue_types.h
  shm: Slim down dependencies
  ipc: Kill bogus dependency on spinlock.h
  Split out irqflags_types.h
  mm_types_task.h: Trim dependencies
  cpumask: Split out cpumask_types.h
  syscall_user_dispatch.h: split out *_types.h
  x86/signal: kill dependency on time.h
  uapi/linux/resource.h: fix include
  refcount: Split out refcount_types.h
  seccomp: Split out seccomp_types.h
  uidgid: Split out uidgid_types.h
  sem: Split out sem_types.h
  lockdep: move held_lock to lockdep_types.h
  restart_block: Trim includes
  rseq: Split out rseq.h from sched.h
  preempt.h: Kill dependency on list.h
  thread_info, uaccess.h: Move HARDENED_USERCOPY to better location
  Kill unnecessary kernel.h include
  kill unnecessary thread_info.h include
  Kill sched.h dependency on rcupdate.h

Matthew Wilcox (Oracle) (1):
  wait: Remove uapi header file from main header file

 arch/arm64/include/asm/spectre.h            |   4 +-
 arch/x86/include/asm/current.h              |   1 +
 arch/x86/include/asm/debugreg.h             |   1 +
 arch/x86/include/asm/fpu/types.h            |   2 +
 arch/x86/include/asm/paravirt_types.h       |   2 +
 arch/x86/include/asm/percpu.h               |   2 +-
 arch/x86/include/asm/preempt.h              |   1 -
 arch/x86/include/asm/tlbbatch.h             |   2 +-
 arch/x86/include/uapi/asm/signal.h          |   1 -
 arch/x86/kernel/fpu/bugs.c                  |   1 +
 arch/x86/kernel/signal.c                    |   1 +
 arch/x86/lib/cache-smp.c                    |   1 +
 drivers/gpu/drm/i915/i915_memcpy.c          |   2 +
 drivers/target/target_core_xcopy.c          |   1 +
 fs/exec.c                                   |   1 +
 include/linux/audit.h                       |   1 +
 include/linux/cpumask.h                     |   4 +-
 include/linux/cpumask_types.h               |  12 +
 include/linux/dma-fence.h                   |   1 +
 include/linux/hrtimer.h                     |  46 +--
 include/linux/hrtimer_types.h               |  50 +++
 include/linux/ipc.h                         |   2 +-
 include/linux/irqflags.h                    |  14 +-
 include/linux/irqflags_types.h              |  22 ++
 include/linux/kmsan_types.h                 |   2 +
 include/linux/ktime.h                       |   8 +-
 include/linux/lockdep.h                     |  57 ----
 include/linux/lockdep_types.h               |  57 ++++
 include/linux/mm_types_task.h               |   7 +-
 include/linux/mutex.h                       |  52 +---
 include/linux/mutex_types.h                 |  71 +++++
 include/linux/nodemask.h                    |   2 +-
 include/linux/nodemask_types.h              |  10 +
 include/linux/nsproxy.h                     |   1 +
 include/linux/numa.h                        |  18 +-
 include/linux/pid.h                         | 140 ++++++++-
 include/linux/pid_types.h                   |  16 +
 include/linux/plist.h                       |  12 +-
 include/linux/plist_types.h                 |  17 ++
 include/linux/posix-timers.h                |  68 +----
 include/linux/posix-timers_types.h          |  72 +++++
 include/linux/prandom.h                     |   1 -
 include/linux/preempt.h                     |   6 +-
 include/linux/rcupdate.h                    |  11 +
 include/linux/refcount.h                    |  13 +-
 include/linux/refcount_types.h              |  19 ++
 include/linux/restart_block.h               |   2 +-
 include/linux/resume_user_mode.h            |   1 +
 include/linux/rhashtable-types.h            |   2 +-
 include/linux/rseq.h                        | 131 ++++++++
 include/linux/rslib.h                       |   1 -
 include/linux/sched.h                       | 320 ++------------------
 include/linux/sched/signal.h                |   1 +
 include/linux/sched/task_stack.h            |   1 +
 include/linux/seccomp.h                     |  22 +-
 include/linux/seccomp_types.h               |  26 ++
 include/linux/sem.h                         |  10 +-
 include/linux/sem_types.h                   |  13 +
 include/linux/seqlock.h                     |  79 +----
 include/linux/seqlock_types.h               |  93 ++++++
 include/linux/shm.h                         |   4 +-
 include/linux/signal.h                      |   1 +
 include/linux/signal_types.h                |   2 +-
 include/linux/spinlock.h                    |  31 ++
 include/linux/syscall_user_dispatch.h       |   9 +-
 include/linux/syscall_user_dispatch_types.h |  22 ++
 include/linux/thread_info.h                 |  49 ---
 include/linux/time_namespace.h              |   3 +
 include/linux/timekeeping.h                 |   1 +
 include/linux/timer.h                       |  16 +-
 include/linux/timer_types.h                 |  23 ++
 include/linux/timerqueue.h                  |  13 +-
 include/linux/timerqueue_types.h            |  17 ++
 include/linux/types.h                       |   3 +
 include/linux/uaccess.h                     |  49 +++
 include/linux/uidgid.h                      |  11 +-
 include/linux/uidgid_types.h                |  15 +
 include/linux/uio.h                         |   2 +-
 include/linux/wait.h                        |   1 -
 include/linux/workqueue.h                   |  16 +-
 include/linux/workqueue_types.h             |  25 ++
 include/uapi/linux/resource.h               |   2 +-
 init/init_task.c                            |   1 +
 ipc/shm.c                                   |   1 +
 kernel/Makefile                             |   1 +
 kernel/exit.c                               |   4 +-
 kernel/fork.c                               |   2 +
 kernel/futex/core.c                         |   1 +
 kernel/futex/requeue.c                      |   1 +
 kernel/futex/waitwake.c                     |   1 +
 kernel/numa.c                               |  24 ++
 kernel/pid_namespace.c                      |   1 +
 kernel/sched/core.c                         |   1 +
 mm/swapfile.c                               |   1 +
 security/selinux/hooks.c                    |   1 +
 security/smack/smack_lsm.c                  |   1 +
 96 files changed, 1068 insertions(+), 825 deletions(-)
 create mode 100644 include/linux/cpumask_types.h
 create mode 100644 include/linux/hrtimer_types.h
 create mode 100644 include/linux/irqflags_types.h
 create mode 100644 include/linux/mutex_types.h
 create mode 100644 include/linux/nodemask_types.h
 create mode 100644 include/linux/pid_types.h
 create mode 100644 include/linux/plist_types.h
 create mode 100644 include/linux/posix-timers_types.h
 create mode 100644 include/linux/refcount_types.h
 create mode 100644 include/linux/rseq.h
 create mode 100644 include/linux/seccomp_types.h
 create mode 100644 include/linux/sem_types.h
 create mode 100644 include/linux/seqlock_types.h
 create mode 100644 include/linux/syscall_user_dispatch_types.h
 create mode 100644 include/linux/timer_types.h
 create mode 100644 include/linux/timerqueue_types.h
 create mode 100644 include/linux/uidgid_types.h
 create mode 100644 include/linux/workqueue_types.h
 create mode 100644 kernel/numa.c

-- 
2.43.0


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

end of thread, other threads:[~2024-03-08 13:46 UTC | newest]

Thread overview: 95+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-16  2:47 [PATCH 00/50] big header dependency cleanup targeting sched.h Kent Overstreet
2023-12-16  2:47 ` [PATCH 01/50] drivers/gpu/drm/i915/i915_memcpy.c: fix missing includes Kent Overstreet
2024-03-08 13:46   ` Jani Nikula
2023-12-16  2:47 ` [PATCH 02/50] x86/kernel/fpu/bugs.c: fix missing include Kent Overstreet
2023-12-18 11:08   ` Sohil Mehta
2023-12-19  2:05     ` Kent Overstreet
2023-12-16  2:47 ` [PATCH 03/50] x86/lib/cache-smp.c: " Kent Overstreet
2023-12-18 10:48   ` Sohil Mehta
2023-12-19  2:06     ` Kent Overstreet
2023-12-19  4:04       ` Sohil Mehta
2023-12-16  2:47 ` [PATCH 04/50] x86/include/asm/debugreg.h: " Kent Overstreet
2023-12-16  2:47 ` [PATCH 05/50] x86/include/asm/paravirt_types.h: " Kent Overstreet
2023-12-16  2:47 ` [PATCH 06/50] task_stack.h: add " Kent Overstreet
2023-12-16  2:47 ` [PATCH 07/50] nsproxy.h: " Kent Overstreet
2023-12-16  2:47 ` [PATCH 08/50] kernel/fork.c: " Kent Overstreet
2023-12-16  2:47 ` [PATCH 09/50] kmsan: add missing types.h dependency Kent Overstreet
2023-12-16  2:47 ` [PATCH 10/50] time_namespace.h: fix missing include Kent Overstreet
2023-12-16  3:26 ` [PATCH 11/50] nodemask: Split out include/linux/nodemask_types.h Kent Overstreet
2023-12-16  3:26   ` [PATCH 12/50] prandom: Remove unused include Kent Overstreet
2023-12-16 18:52     ` Randy Dunlap
2023-12-16 22:19       ` Kent Overstreet
2023-12-16  3:26   ` [PATCH 13/50] timekeeping: Kill percpu.h dependency Kent Overstreet
2023-12-16  3:26   ` [PATCH 14/50] arm64: Fix circular header dependency Kent Overstreet
2023-12-16  3:26   ` [PATCH 15/50] kernel/numa.c: Move logging out of numa.h Kent Overstreet
2023-12-19 16:36     ` Nathan Chancellor
2023-12-19 21:02       ` Kent Overstreet
2023-12-19 22:52     ` Matthew Wilcox
2023-12-20  0:37       ` Kent Overstreet
2023-12-16  3:26   ` [PATCH 16/50] sched.h: Move (spin|rwlock)_needbreak() to spinlock.h Kent Overstreet
2024-01-15 20:31     ` Leonardo Bras
2023-12-16  3:26   ` [PATCH 17/50] ktime.h: move ktime_t to types.h Kent Overstreet
2023-12-16  3:26   ` [PATCH 18/50] hrtimers: Split out hrtimer_types.h Kent Overstreet
2023-12-16  3:26   ` [PATCH 19/50] locking/mutex: split out mutex_types.h Kent Overstreet
     [not found]     ` <7066c278-28e0-45eb-a046-eb684c4a659c@redhat.com>
2023-12-18 18:12       ` Waiman Long
2023-12-19  1:46       ` Kent Overstreet
2023-12-19  3:04         ` Waiman Long
2023-12-19  3:37           ` Kent Overstreet
2023-12-19  3:39             ` Waiman Long
2023-12-16  3:26   ` [PATCH 20/50] posix-cpu-timers: Split out posix-timers_types.h Kent Overstreet
2023-12-16  3:26   ` [PATCH 21/50] locking/seqlock: Split out seqlock_types.h Kent Overstreet
2023-12-18 17:02     ` Waiman Long
2023-12-16  3:29 ` [PATCH 22/50] pid: Split out pid_types.h Kent Overstreet
2023-12-16  3:29   ` [PATCH 23/50] sched.h: move pid helpers to pid.h Kent Overstreet
2023-12-16  3:29   ` [PATCH 24/50] plist: Split out plist_types.h Kent Overstreet
2023-12-16  3:29   ` [PATCH 25/50] wait: Remove uapi header file from main header file Kent Overstreet
2023-12-18 12:39     ` Christian Brauner
2023-12-16  3:29   ` [PATCH 26/50] rslib: kill bogus dependency on list.h Kent Overstreet
2023-12-16 19:05     ` Randy Dunlap
2023-12-16 19:09       ` Kent Overstreet
2023-12-16 19:10       ` Randy Dunlap
2023-12-16  3:29   ` [PATCH 27/50] timerqueue: Split out timerqueue_types.h Kent Overstreet
2023-12-16  3:29   ` [PATCH 28/50] signal: Kill bogus dependency on list.h Kent Overstreet
2023-12-16  3:29   ` [PATCH 29/50] timers: Split out timer_types.h Kent Overstreet
2023-12-16  3:29   ` [PATCH 30/50] workqueue: Split out workqueue_types.h Kent Overstreet
2023-12-16  3:29   ` [PATCH 31/50] shm: Slim down dependencies Kent Overstreet
2023-12-16  3:29   ` [PATCH 32/50] ipc: Kill bogus dependency on spinlock.h Kent Overstreet
2023-12-18 11:04   ` [PATCH 22/50] pid: Split out pid_types.h Christian Brauner
2023-12-16  3:32 ` [PATCH 33/50] Split out irqflags_types.h Kent Overstreet
2023-12-16  3:32   ` [PATCH 34/50] mm_types_task.h: Trim dependencies Kent Overstreet
2023-12-16  3:32   ` [PATCH 35/50] cpumask: Split out cpumask_types.h Kent Overstreet
2023-12-16  3:32   ` [PATCH 36/50] syscall_user_dispatch.h: split out *_types.h Kent Overstreet
2023-12-16  3:32   ` [PATCH 37/50] x86/signal: kill dependency on time.h Kent Overstreet
2023-12-16  3:32   ` [PATCH 38/50] uapi/linux/resource.h: fix include Kent Overstreet
2023-12-16  3:32   ` [PATCH 39/50] refcount: Split out refcount_types.h Kent Overstreet
2023-12-16  3:32   ` [PATCH 40/50] seccomp: Split out seccomp_types.h Kent Overstreet
2023-12-16  3:32   ` [PATCH 41/50] uidgid: Split out uidgid_types.h Kent Overstreet
2023-12-18 11:01     ` Christian Brauner
2023-12-16  3:32   ` [PATCH 42/50] sem: Split out sem_types.h Kent Overstreet
2023-12-20 11:53     ` Geert Uytterhoeven
2023-12-20 21:39       ` Kent Overstreet
2024-01-02  8:47         ` Geert Uytterhoeven
2023-12-16  3:32   ` [PATCH 43/50] lockdep: move held_lock to lockdep_types.h Kent Overstreet
2023-12-18 17:05     ` Waiman Long
2023-12-16  3:35 ` [PATCH 44/50] restart_block: Trim includes Kent Overstreet
2023-12-16  3:35   ` [PATCH 45/50] rseq: Split out rseq.h from sched.h Kent Overstreet
2023-12-16  3:35   ` [PATCH 46/50] preempt.h: Kill dependency on list.h Kent Overstreet
2023-12-16  6:13     ` Matthew Wilcox
2023-12-16 19:21       ` Randy Dunlap
2023-12-16 22:35       ` Kent Overstreet
2023-12-17  0:04         ` Randy Dunlap
2023-12-17  0:18           ` Matthew Wilcox
2023-12-17  0:20             ` Kent Overstreet
2023-12-17  2:03               ` Randy Dunlap
2023-12-17  2:05                 ` Kent Overstreet
2023-12-17  0:18           ` Kent Overstreet
2023-12-17  0:26             ` Randy Dunlap
2023-12-16  3:35   ` [PATCH 47/50] thread_info, uaccess.h: Move HARDENED_USERCOPY to better location Kent Overstreet
2023-12-16  3:35   ` [PATCH 48/50] Kill unnecessary kernel.h include Kent Overstreet
2023-12-16  3:35   ` [PATCH 49/50] kill unnecessary thread_info.h include Kent Overstreet
2023-12-16  3:35   ` [PATCH 50/50] Kill sched.h dependency on rcupdate.h Kent Overstreet
2023-12-16 19:35     ` Paul E. McKenney
2023-12-16 22:20       ` Kent Overstreet
2023-12-20 11:59     ` Geert Uytterhoeven
2023-12-20 21:39       ` Kent Overstreet
2024-01-02 11:39         ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).