All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies"
@ 2017-02-08 18:50 Ingo Molnar
  2017-02-08 18:50 ` [PATCH 01/35] sched/headers: Remove <linux/sched.h> from <linux/sched/topology.h> Ingo Molnar
                   ` (34 more replies)
  0 siblings, 35 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

This is phase #4 of the sched.h modernization series.

These remove header #include lines and remove prototypes and thus shrink the
header dependency graph monotonically to the desired end result. These are
small patches but most breakage will likely bisect to these, so their
finegrained split-up is useful as well.

See the announcement for more details:

  https://lkml.org/lkml/2017/2/8/564

The Git tree can be found at:

  git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core

Thanks,

    Ingo

Ingo Molnar (35):
  sched/headers: Remove <linux/sched.h> from <linux/sched/topology.h>
  sched/headers: Remove tsk_is_polling()
  sched/headers: Remove <linux/sched.h> from <linux/sched/wake_q.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/clock.h>
  sched/headers: Remove <linux/sched.h> and <linux/slab.h> from <linux/delayacct.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/loadavg.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/autogroup.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/mm.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/coredump.h>
  sched/headers: Remove unused 'task_can_switch_user()' prototype
  sched/headers: Remove <linux/sched.h> from <linux/sched/user.h>
  sched/headers: Remove #include <linux/capability.h> from <linux/sched.h>
  sched/headers: Remove <linux/cgroup-defs.h> from <linux/sched.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/cpufreq.h>
  kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h>
  sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h>
  sched/headers: Remove <asm/ptrace.h> from <linux/sched.h>
  sched/headers: Remove <linux/rtmutex.h> from <linux/sched.h>
  sched/headers: Remove the <linux/gfp.h> include from <linux/sched.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/stat.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/nohz.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/debug.h>
  sched/headers: Remove <linux/sched.h> from <linux/sched/hotplug.h>
  sched/headers: Remove the runqueue_is_locked() prototype
  sched/headers: Remove <linux/rwsem.h> from <linux/sched.h>
  sched/headers: Remove <linux/signal.h> from <linux/sched.h>
  sched/headers: Remove the 'init_pid_ns' prototype from <linux/sched.h>
  sched/headers: Remove <linux/rculist.h> from <linux/sched.h>
  sched/core: Remove unused prefetch_stack()
  sched/headers: Remove <linux/sched.h> from <linux/sched/init.h>
  sched/headers: Remove <linux/magic.h> from <linux/sched/task_stack.h>
  sched/headers, timers: Remove the <linux/sysctl.h> include from <linux/timer.h>
  sched/headers, x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h>
  sched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h>
  sched/headers: Remove the <linux/topology.h> include from <linux/sched.h>

 arch/ia64/include/asm/processor.h |  2 --
 arch/ia64/kernel/entry.S          | 23 -----------------------
 arch/x86/include/asm/apic.h       |  1 -
 include/linux/delayacct.h         |  2 --
 include/linux/hrtimer.h           |  1 -
 include/linux/kasan.h             |  1 -
 include/linux/sched.h             | 32 ++------------------------------
 include/linux/sched/autogroup.h   |  3 +--
 include/linux/sched/clock.h       |  2 +-
 include/linux/sched/coredump.h    |  1 -
 include/linux/sched/cpufreq.h     |  2 +-
 include/linux/sched/debug.h       |  2 --
 include/linux/sched/hotplug.h     |  2 --
 include/linux/sched/idle.h        |  5 -----
 include/linux/sched/init.h        |  2 --
 include/linux/sched/loadavg.h     |  2 --
 include/linux/sched/mm.h          |  2 ++
 include/linux/sched/nohz.h        |  2 --
 include/linux/sched/stat.h        |  2 +-
 include/linux/sched/topology.h    |  7 ++++++-
 include/linux/sched/user.h        |  3 ++-
 include/linux/sched/wake_q.h      |  5 +++--
 include/linux/timer.h             |  2 +-
 include/linux/user_namespace.h    |  2 ++
 include/target/target_core_base.h |  1 +
 kernel/utsname_sysctl.c           |  1 +
 26 files changed, 24 insertions(+), 86 deletions(-)

-- 
2.7.4

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

* [PATCH 01/35] sched/headers: Remove <linux/sched.h> from <linux/sched/topology.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
@ 2017-02-08 18:50 ` Ingo Molnar
  2017-02-08 18:50 ` [PATCH 02/35] sched/headers: Remove tsk_is_polling() Ingo Molnar
                   ` (33 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/topology.h> file is a self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/topology.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index b3550b36e65d..0d6fceff37bb 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -1,8 +1,6 @@
 #ifndef _LINUX_SCHED_TOPOLOGY_H
 #define _LINUX_SCHED_TOPOLOGY_H
 
-#include <linux/sched.h>
-
 #include <linux/sched/idle.h>
 
 /*
-- 
2.7.4

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

* [PATCH 02/35] sched/headers: Remove tsk_is_polling()
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
  2017-02-08 18:50 ` [PATCH 01/35] sched/headers: Remove <linux/sched.h> from <linux/sched/topology.h> Ingo Molnar
@ 2017-02-08 18:50 ` Ingo Molnar
  2017-02-08 18:50 ` [PATCH 03/35] sched/headers: Remove <linux/sched.h> from <linux/sched/wake_q.h> Ingo Molnar
                   ` (32 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

It's not used by anything.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/idle.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/linux/sched/idle.h b/include/linux/sched/idle.h
index 66ee32f87f0b..5ca63ebad6b4 100644
--- a/include/linux/sched/idle.h
+++ b/include/linux/sched/idle.h
@@ -17,10 +17,6 @@ extern void wake_up_if_idle(int cpu);
  * polling state.
  */
 #ifdef TIF_POLLING_NRFLAG
-static inline int tsk_is_polling(struct task_struct *p)
-{
-	return test_tsk_thread_flag(p, TIF_POLLING_NRFLAG);
-}
 
 static inline void __current_set_polling(void)
 {
@@ -59,7 +55,6 @@ static inline bool __must_check current_clr_polling_and_test(void)
 }
 
 #else
-static inline int tsk_is_polling(struct task_struct *p) { return 0; }
 static inline void __current_set_polling(void) { }
 static inline void __current_clr_polling(void) { }
 
-- 
2.7.4

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

* [PATCH 03/35] sched/headers: Remove <linux/sched.h> from <linux/sched/wake_q.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
  2017-02-08 18:50 ` [PATCH 01/35] sched/headers: Remove <linux/sched.h> from <linux/sched/topology.h> Ingo Molnar
  2017-02-08 18:50 ` [PATCH 02/35] sched/headers: Remove tsk_is_polling() Ingo Molnar
@ 2017-02-08 18:50 ` Ingo Molnar
  2017-02-08 18:50 ` [PATCH 04/35] sched/headers: Remove <linux/sched.h> from <linux/sched/clock.h> Ingo Molnar
                   ` (31 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

After adding a 'struct task_struct' predeclaration the <linux/sched/wake_q.h>
file becomes a self-contained header and users of it either don't need
<linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/wake_q.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h
index ed66823e845b..e6774a0385fb 100644
--- a/include/linux/sched/wake_q.h
+++ b/include/linux/sched/wake_q.h
@@ -1,8 +1,6 @@
 #ifndef _LINUX_SCHED_WAKE_Q_H
 #define _LINUX_SCHED_WAKE_Q_H
 
-#include <linux/sched.h>
-
 /*
  * Wake-queues are lists of tasks with a pending wakeup, whose
  * callers have already marked the task as woken internally,
@@ -29,6 +27,9 @@
  * must ensure the call is done inside a loop, confirming that the
  * wakeup condition has in fact occurred.
  */
+
+struct task_struct;
+
 struct wake_q_node {
 	struct wake_q_node *next;
 };
-- 
2.7.4

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

* [PATCH 04/35] sched/headers: Remove <linux/sched.h> from <linux/sched/clock.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (2 preceding siblings ...)
  2017-02-08 18:50 ` [PATCH 03/35] sched/headers: Remove <linux/sched.h> from <linux/sched/wake_q.h> Ingo Molnar
@ 2017-02-08 18:50 ` Ingo Molnar
  2017-02-08 18:50 ` [PATCH 05/35] sched/headers: Remove <linux/sched.h> and <linux/slab.h> from <linux/delayacct.h> Ingo Molnar
                   ` (30 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/clock.h> file is a largely self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/clock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sched/clock.h b/include/linux/sched/clock.h
index ac12f71d359c..4a68c6791207 100644
--- a/include/linux/sched/clock.h
+++ b/include/linux/sched/clock.h
@@ -1,7 +1,7 @@
 #ifndef _LINUX_SCHED_CLOCK_H
 #define _LINUX_SCHED_CLOCK_H
 
-#include <linux/sched.h>
+#include <linux/smp.h>
 
 /*
  * Do not use outside of architecture code which knows its limitations.
-- 
2.7.4

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

* [PATCH 05/35] sched/headers: Remove <linux/sched.h> and <linux/slab.h> from <linux/delayacct.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (3 preceding siblings ...)
  2017-02-08 18:50 ` [PATCH 04/35] sched/headers: Remove <linux/sched.h> from <linux/sched/clock.h> Ingo Molnar
@ 2017-02-08 18:50 ` Ingo Molnar
  2017-02-08 18:50 ` [PATCH 06/35] sched/headers: Remove <linux/sched.h> from <linux/sched/loadavg.h> Ingo Molnar
                   ` (29 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/delayacct.h> file is a self-contained header and users of
it either don't need <linux/sched.h> and <linux/slab.h> - or have
already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/delayacct.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h
index 6b769cbd1000..4178d2493547 100644
--- a/include/linux/delayacct.h
+++ b/include/linux/delayacct.h
@@ -18,8 +18,6 @@
 #define _LINUX_DELAYACCT_H
 
 #include <uapi/linux/taskstats.h>
-#include <linux/sched.h>
-#include <linux/slab.h>
 
 /*
  * Per-task flags relevant to delay accounting
-- 
2.7.4

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

* [PATCH 06/35] sched/headers: Remove <linux/sched.h> from <linux/sched/loadavg.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (4 preceding siblings ...)
  2017-02-08 18:50 ` [PATCH 05/35] sched/headers: Remove <linux/sched.h> and <linux/slab.h> from <linux/delayacct.h> Ingo Molnar
@ 2017-02-08 18:50 ` Ingo Molnar
  2017-02-08 18:50 ` [PATCH 07/35] sched/headers: Remove <linux/sched.h> from <linux/sched/autogroup.h> Ingo Molnar
                   ` (28 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/loadavg.h> file is a self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/loadavg.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched/loadavg.h b/include/linux/sched/loadavg.h
index c392e28ce0ac..4264bc6b2c27 100644
--- a/include/linux/sched/loadavg.h
+++ b/include/linux/sched/loadavg.h
@@ -1,8 +1,6 @@
 #ifndef _LINUX_SCHED_LOADAVG_H
 #define _LINUX_SCHED_LOADAVG_H
 
-#include <linux/sched.h>
-
 /*
  * These are the constant used to fake the fixed-point load-average
  * counting. Some notes:
-- 
2.7.4

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

* [PATCH 07/35] sched/headers: Remove <linux/sched.h> from <linux/sched/autogroup.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (5 preceding siblings ...)
  2017-02-08 18:50 ` [PATCH 06/35] sched/headers: Remove <linux/sched.h> from <linux/sched/loadavg.h> Ingo Molnar
@ 2017-02-08 18:50 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 08/35] sched/headers: Remove <linux/sched.h> from <linux/sched/mm.h> Ingo Molnar
                   ` (27 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/autogroup.h> file is a largely self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

Add a 'task_struct' predeclaration to make it build standalone.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/autogroup.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/sched/autogroup.h b/include/linux/sched/autogroup.h
index fd6855548d0c..55cd496df884 100644
--- a/include/linux/sched/autogroup.h
+++ b/include/linux/sched/autogroup.h
@@ -1,9 +1,8 @@
 #ifndef _LINUX_SCHED_AUTOGROUP_H
 #define _LINUX_SCHED_AUTOGROUP_H
 
-#include <linux/sched.h>
-
 struct signal_struct;
+struct task_struct;
 struct task_group;
 struct seq_file;
 
-- 
2.7.4

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

* [PATCH 08/35] sched/headers: Remove <linux/sched.h> from <linux/sched/mm.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (6 preceding siblings ...)
  2017-02-08 18:50 ` [PATCH 07/35] sched/headers: Remove <linux/sched.h> from <linux/sched/autogroup.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 09/35] sched/headers: Remove <linux/sched.h> from <linux/sched/coredump.h> Ingo Molnar
                   ` (26 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/mm.h> file is a self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

Include kernel.h and atomic.h.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/mm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
index 5eba3890d00e..522a1aa070a3 100644
--- a/include/linux/sched/mm.h
+++ b/include/linux/sched/mm.h
@@ -1,6 +1,8 @@
 #ifndef _LINUX_SCHED_MM_H
 #define _LINUX_SCHED_MM_H
 
+#include <linux/kernel.h>
+#include <linux/atomic.h>
 #include <linux/sched.h>
 #include <linux/mm_types.h>
 #include <linux/gfp.h>
-- 
2.7.4

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

* [PATCH 09/35] sched/headers: Remove <linux/sched.h> from <linux/sched/coredump.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (7 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 08/35] sched/headers: Remove <linux/sched.h> from <linux/sched/mm.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 10/35] sched/headers: Remove unused 'task_can_switch_user()' prototype Ingo Molnar
                   ` (25 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/coredump.h> file is a self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

Include <linux/mm_types.h>.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/coredump.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h
index f46912aa4f4c..69eedcef8f03 100644
--- a/include/linux/sched/coredump.h
+++ b/include/linux/sched/coredump.h
@@ -1,7 +1,6 @@
 #ifndef _LINUX_SCHED_COREDUMP_H
 #define _LINUX_SCHED_COREDUMP_H
 
-#include <linux/sched.h>
 #include <linux/mm_types.h>
 
 #define SUID_DUMP_DISABLE	0	/* No setuid dumping */
-- 
2.7.4

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

* [PATCH 10/35] sched/headers: Remove unused 'task_can_switch_user()' prototype
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (8 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 09/35] sched/headers: Remove <linux/sched.h> from <linux/sched/coredump.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 11/35] sched/headers: Remove <linux/sched.h> from <linux/sched/user.h> Ingo Molnar
                   ` (24 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The function does not exist anymore.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 814f7c731e9f..dc0c024333e2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1505,9 +1505,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
 extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask);
 extern long sched_getaffinity(pid_t pid, struct cpumask *mask);
 
-extern int task_can_switch_user(struct user_struct *up,
-					struct task_struct *tsk);
-
 #ifndef TASK_SIZE_OF
 #define TASK_SIZE_OF(tsk)	TASK_SIZE
 #endif
-- 
2.7.4

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

* [PATCH 11/35] sched/headers: Remove <linux/sched.h> from <linux/sched/user.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (9 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 10/35] sched/headers: Remove unused 'task_can_switch_user()' prototype Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 12/35] sched/headers: Remove #include <linux/capability.h> from <linux/sched.h> Ingo Molnar
                   ` (23 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

If we add <linux/uidgid.h> then <linux/sched/user.h> becomes a
self-contained header and users of it either don't need <linux/sched.h>
or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/user.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/sched/user.h b/include/linux/sched/user.h
index c3824e6780e5..47600dd62ded 100644
--- a/include/linux/sched/user.h
+++ b/include/linux/sched/user.h
@@ -1,7 +1,8 @@
 #ifndef _LINUX_SCHED_USER_H
 #define _LINUX_SCHED_USER_H
 
-#include <linux/sched.h>
+#include <linux/uidgid.h>
+#include <linux/atomic.h>
 
 struct key;
 
-- 
2.7.4

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

* [PATCH 12/35] sched/headers: Remove #include <linux/capability.h> from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (10 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 11/35] sched/headers: Remove <linux/sched.h> from <linux/sched/user.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 13/35] sched/headers: Remove <linux/cgroup-defs.h> " Ingo Molnar
                   ` (22 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched.h> header does not actually make use of any
types or APIs defined in <linux/capability.h>, so remove its inclusion.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index dc0c024333e2..117b7661b982 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -5,7 +5,6 @@
 
 #include <linux/sched/prio.h>
 
-#include <linux/capability.h>
 #include <linux/mutex.h>
 #include <linux/plist.h>
 #include <linux/mm_types_task.h>
-- 
2.7.4

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

* [PATCH 13/35] sched/headers: Remove <linux/cgroup-defs.h> from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (11 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 12/35] sched/headers: Remove #include <linux/capability.h> from <linux/sched.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 14/35] sched/headers: Remove <linux/sched.h> from <linux/sched/cpufreq.h> Ingo Molnar
                   ` (21 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

It's not used by anything in <linux/sched.h> anymore.

This reduces the preprocessed size of <linux/sched.h> and
speeds up the build a bit.

Also fix code that implicitly relied on headers included by <linux/cgroup-defs.h>.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h             | 1 -
 include/target/target_core_base.h | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 117b7661b982..891ed527ce7b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -28,7 +28,6 @@
 #include <linux/gfp.h>
 #include <linux/topology.h>
 #include <linux/magic.h>
-#include <linux/cgroup-defs.h>
 
 #include <asm/current.h>
 
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 6762af126cbc..d5d2e3223e6c 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -4,6 +4,7 @@
 #include <linux/configfs.h>      /* struct config_group */
 #include <linux/dma-direction.h> /* enum dma_data_direction */
 #include <linux/percpu_ida.h>    /* struct percpu_ida */
+#include <linux/percpu-refcount.h>
 #include <linux/semaphore.h>     /* struct semaphore */
 #include <linux/completion.h>
 
-- 
2.7.4

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

* [PATCH 14/35] sched/headers: Remove <linux/sched.h> from <linux/sched/cpufreq.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (12 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 13/35] sched/headers: Remove <linux/cgroup-defs.h> " Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 15/35] kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h> Ingo Molnar
                   ` (20 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

Make the <linux/sched/cpufreq.h> file a self-contained header and
remove the <linux/sched.h> dependency: users of it either don't
need <linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/cpufreq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sched/cpufreq.h b/include/linux/sched/cpufreq.h
index 2bdcfbfc4c30..d2be2ccbb372 100644
--- a/include/linux/sched/cpufreq.h
+++ b/include/linux/sched/cpufreq.h
@@ -1,7 +1,7 @@
 #ifndef _LINUX_SCHED_CPUFREQ_H
 #define _LINUX_SCHED_CPUFREQ_H
 
-#include <linux/sched.h>
+#include <linux/types.h>
 
 /*
  * Interface between cpufreq drivers and the scheduler:
-- 
2.7.4

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

* [PATCH 15/35] kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (13 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 14/35] sched/headers: Remove <linux/sched.h> from <linux/sched/cpufreq.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 16/35] sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h> Ingo Molnar
                   ` (19 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

<linux/kasan.h> is a low level header that is included early
in affected kernel headers. But it includes <linux/sched.h>
which complicates the cleanup of sched.h dependencies.

Remove it.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/kasan.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 96ef4c33148d..42ee86cfbfc8 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -1,7 +1,6 @@
 #ifndef _LINUX_KASAN_H
 #define _LINUX_KASAN_H
 
-#include <linux/sched.h>
 #include <linux/types.h>
 
 struct kmem_cache;
-- 
2.7.4

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

* [PATCH 16/35] sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (14 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 15/35] kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 17/35] sched/headers: Remove <asm/ptrace.h> " Ingo Molnar
                   ` (18 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

This reduces header dependencies and speeds up the build.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 891ed527ce7b..fce27dc4bee3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -24,7 +24,6 @@
 #include <linux/kcov.h>
 #include <linux/task_io_accounting.h>
 #include <linux/latencytop.h>
-#include <linux/cred.h>
 #include <linux/gfp.h>
 #include <linux/topology.h>
 #include <linux/magic.h>
-- 
2.7.4

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

* [PATCH 17/35] sched/headers: Remove <asm/ptrace.h> from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (15 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 16/35] sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 18/35] sched/headers: Remove <linux/rtmutex.h> " Ingo Molnar
                   ` (17 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

This reduces header dependencies.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index fce27dc4bee3..2b737e6996a3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -8,7 +8,6 @@
 #include <linux/mutex.h>
 #include <linux/plist.h>
 #include <linux/mm_types_task.h>
-#include <asm/ptrace.h>
 
 #include <linux/sem.h>
 #include <linux/shm.h>
-- 
2.7.4

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

* [PATCH 18/35] sched/headers: Remove <linux/rtmutex.h> from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (16 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 17/35] sched/headers: Remove <asm/ptrace.h> " Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 19/35] sched/headers: Remove the <linux/gfp.h> include " Ingo Molnar
                   ` (16 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

This reduces header dependencies.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2b737e6996a3..34a388af9606 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -16,7 +16,6 @@
 #include <linux/pid.h>
 #include <linux/seccomp.h>
 #include <linux/rculist.h>
-#include <linux/rtmutex.h>
 
 #include <linux/resource.h>
 #include <linux/hrtimer.h>
-- 
2.7.4

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

* [PATCH 19/35] sched/headers: Remove the <linux/gfp.h> include from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (17 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 18/35] sched/headers: Remove <linux/rtmutex.h> " Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 20/35] sched/headers: Remove <linux/sched.h> from <linux/sched/stat.h> Ingo Molnar
                   ` (15 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

This reduces sched.h header dependencies.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 34a388af9606..45a4d10dffd1 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -22,7 +22,6 @@
 #include <linux/kcov.h>
 #include <linux/task_io_accounting.h>
 #include <linux/latencytop.h>
-#include <linux/gfp.h>
 #include <linux/topology.h>
 #include <linux/magic.h>
 
-- 
2.7.4

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

* [PATCH 20/35] sched/headers: Remove <linux/sched.h> from <linux/sched/stat.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (18 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 19/35] sched/headers: Remove the <linux/gfp.h> include " Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 21/35] sched/headers: Remove <linux/sched.h> from <linux/sched/nohz.h> Ingo Molnar
                   ` (14 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/stat.h> file is a largely self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

( Keep the <linux/percpu.h> dependency.)

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/stat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sched/stat.h b/include/linux/sched/stat.h
index d8cedf27083e..141b74c53fad 100644
--- a/include/linux/sched/stat.h
+++ b/include/linux/sched/stat.h
@@ -1,7 +1,7 @@
 #ifndef _LINUX_SCHED_STAT_H
 #define _LINUX_SCHED_STAT_H
 
-#include <linux/sched.h>
+#include <linux/percpu.h>
 
 /*
  * Various counters maintained by the scheduler and fork(),
-- 
2.7.4

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

* [PATCH 21/35] sched/headers: Remove <linux/sched.h> from <linux/sched/nohz.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (19 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 20/35] sched/headers: Remove <linux/sched.h> from <linux/sched/stat.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 22/35] sched/headers: Remove <linux/sched.h> from <linux/sched/debug.h> Ingo Molnar
                   ` (13 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/nohz.h> file is a self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/nohz.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched/nohz.h b/include/linux/sched/nohz.h
index 9471f0736a3a..4995b717500b 100644
--- a/include/linux/sched/nohz.h
+++ b/include/linux/sched/nohz.h
@@ -1,8 +1,6 @@
 #ifndef _LINUX_SCHED_NOHZ_H
 #define _LINUX_SCHED_NOHZ_H
 
-#include <linux/sched.h>
-
 /*
  * This is the interface between the scheduler and nohz/dyntics:
  */
-- 
2.7.4

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

* [PATCH 22/35] sched/headers: Remove <linux/sched.h> from <linux/sched/debug.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (20 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 21/35] sched/headers: Remove <linux/sched.h> from <linux/sched/nohz.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 23/35] sched/headers: Remove <linux/sched.h> from <linux/sched/hotplug.h> Ingo Molnar
                   ` (12 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/debug.h> file is a self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/debug.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched/debug.h b/include/linux/sched/debug.h
index 853bbef0b47b..e0eaee54c5a4 100644
--- a/include/linux/sched/debug.h
+++ b/include/linux/sched/debug.h
@@ -1,8 +1,6 @@
 #ifndef _LINUX_SCHED_DEBUG_H
 #define _LINUX_SCHED_DEBUG_H
 
-#include <linux/sched.h>
-
 /*
  * Various scheduler/task debugging interfaces:
  */
-- 
2.7.4

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

* [PATCH 23/35] sched/headers: Remove <linux/sched.h> from <linux/sched/hotplug.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (21 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 22/35] sched/headers: Remove <linux/sched.h> from <linux/sched/debug.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 24/35] sched/headers: Remove the runqueue_is_locked() prototype Ingo Molnar
                   ` (11 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/hotplug.h> file is a self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/hotplug.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched/hotplug.h b/include/linux/sched/hotplug.h
index c608d3c1ddb8..752ac7e628d7 100644
--- a/include/linux/sched/hotplug.h
+++ b/include/linux/sched/hotplug.h
@@ -1,8 +1,6 @@
 #ifndef _LINUX_SCHED_HOTPLUG_H
 #define _LINUX_SCHED_HOTPLUG_H
 
-#include <linux/sched.h>
-
 /*
  * Scheduler interfaces for hotplug CPU support:
  */
-- 
2.7.4

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

* [PATCH 24/35] sched/headers: Remove the runqueue_is_locked() prototype
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (22 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 23/35] sched/headers: Remove <linux/sched.h> from <linux/sched/hotplug.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 25/35] sched/headers: Remove <linux/rwsem.h> from <linux/sched.h> Ingo Molnar
                   ` (10 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

Remove the runqueue_is_locked() prototype, the function does not exist anymore.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 45a4d10dffd1..fa722c4c18a3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -172,8 +172,6 @@ struct uts_namespace;
 
 extern cpumask_var_t cpu_isolated_map;
 
-extern int runqueue_is_locked(int cpu);
-
 extern void scheduler_tick(void);
 
 #define	MAX_SCHEDULE_TIMEOUT	LONG_MAX
-- 
2.7.4

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

* [PATCH 25/35] sched/headers: Remove <linux/rwsem.h> from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (23 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 24/35] sched/headers: Remove the runqueue_is_locked() prototype Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 26/35] sched/headers: Remove <linux/signal.h> " Ingo Molnar
                   ` (9 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

This is a stray header that is not needed by anything in sched.h,
so remove it.

Update files that relied on the stray inclusion.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h          | 2 --
 include/linux/user_namespace.h | 1 +
 kernel/utsname_sysctl.c        | 1 +
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index fa722c4c18a3..da3847ac3956 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -226,8 +226,6 @@ struct task_cputime {
 #define prof_exp	stime
 #define sched_exp	sum_exec_runtime
 
-#include <linux/rwsem.h>
-
 #ifdef CONFIG_SCHED_INFO
 struct sched_info {
 	/* cumulative counters */
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 746ee376e603..b3613ee889d9 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -5,6 +5,7 @@
 #include <linux/nsproxy.h>
 #include <linux/ns_common.h>
 #include <linux/sched.h>
+#include <linux/rwsem.h>
 #include <linux/sysctl.h>
 #include <linux/err.h>
 
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
index c8eac43267e9..233cd8fc6910 100644
--- a/kernel/utsname_sysctl.c
+++ b/kernel/utsname_sysctl.c
@@ -14,6 +14,7 @@
 #include <linux/utsname.h>
 #include <linux/sysctl.h>
 #include <linux/wait.h>
+#include <linux/rwsem.h>
 
 #ifdef CONFIG_PROC_SYSCTL
 
-- 
2.7.4

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

* [PATCH 26/35] sched/headers: Remove <linux/signal.h> from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (24 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 25/35] sched/headers: Remove <linux/rwsem.h> from <linux/sched.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 27/35] sched/headers: Remove the 'init_pid_ns' prototype " Ingo Molnar
                   ` (8 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

Instead of including the full <linux/signal.h>, only include the types-only
<linux/signal_types.h> header in <linux/sched.h>, to further decouple the
scheduler header from the signal headers.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index da3847ac3956..fb6571b3bf1e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -11,7 +11,6 @@
 
 #include <linux/sem.h>
 #include <linux/shm.h>
-#include <linux/signal.h>
 #include <linux/signal_types.h>
 #include <linux/pid.h>
 #include <linux/seccomp.h>
-- 
2.7.4

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

* [PATCH 27/35] sched/headers: Remove the 'init_pid_ns' prototype from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (25 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 26/35] sched/headers: Remove <linux/signal.h> " Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 28/35] sched/headers: Remove <linux/rculist.h> " Ingo Molnar
                   ` (7 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

pid.h already defines it.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index fb6571b3bf1e..d5df0f1860b3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1297,8 +1297,6 @@ static inline struct thread_info *task_thread_info(struct task_struct *task)
 # define task_thread_info(task)	((struct thread_info *)(task)->stack)
 #endif
 
-extern struct pid_namespace init_pid_ns;
-
 /*
  * find a task by one of its numerical ids
  *
-- 
2.7.4

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

* [PATCH 28/35] sched/headers: Remove <linux/rculist.h> from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (26 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 27/35] sched/headers: Remove the 'init_pid_ns' prototype " Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 29/35] sched/core: Remove unused prefetch_stack() Ingo Molnar
                   ` (6 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

We don't actually need the full rculist.h header anymore, include
the smaller rcupdate.h header instead.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index d5df0f1860b3..8e0756f50181 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -14,7 +14,7 @@
 #include <linux/signal_types.h>
 #include <linux/pid.h>
 #include <linux/seccomp.h>
-#include <linux/rculist.h>
+#include <linux/rcupdate.h>
 
 #include <linux/resource.h>
 #include <linux/hrtimer.h>
-- 
2.7.4

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

* [PATCH 29/35] sched/core: Remove unused prefetch_stack()
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (27 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 28/35] sched/headers: Remove <linux/rculist.h> " Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 30/35] sched/headers: Remove <linux/sched.h> from <linux/sched/init.h> Ingo Molnar
                   ` (5 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

prefetch_stack() is defined by IA64, but not actually used anywhere anymore.

Remove it.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/ia64/include/asm/processor.h |  2 --
 arch/ia64/kernel/entry.S          | 23 -----------------------
 include/linux/sched.h             |  6 ------
 3 files changed, 31 deletions(-)

diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h
index 03911a336406..26a63d69c599 100644
--- a/arch/ia64/include/asm/processor.h
+++ b/arch/ia64/include/asm/processor.h
@@ -19,8 +19,6 @@
 #include <asm/ptrace.h>
 #include <asm/ustack.h>
 
-#define ARCH_HAS_PREFETCH_SWITCH_STACK
-
 #define IA64_NUM_PHYS_STACK_REG	96
 #define IA64_NUM_DBG_REGS	8
 
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 6f27a663177c..e7a716b09350 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -455,29 +455,6 @@ GLOBAL_ENTRY(load_switch_stack)
 	br.cond.sptk.many b7
 END(load_switch_stack)
 
-GLOBAL_ENTRY(prefetch_stack)
-	add r14 = -IA64_SWITCH_STACK_SIZE, sp
-	add r15 = IA64_TASK_THREAD_KSP_OFFSET, in0
-	;;
-	ld8 r16 = [r15]				// load next's stack pointer
-	lfetch.fault.excl [r14], 128
-	;;
-	lfetch.fault.excl [r14], 128
-	lfetch.fault [r16], 128
-	;;
-	lfetch.fault.excl [r14], 128
-	lfetch.fault [r16], 128
-	;;
-	lfetch.fault.excl [r14], 128
-	lfetch.fault [r16], 128
-	;;
-	lfetch.fault.excl [r14], 128
-	lfetch.fault [r16], 128
-	;;
-	lfetch.fault [r16], 128
-	br.ret.sptk.many rp
-END(prefetch_stack)
-
 	/*
 	 * Invoke a system call, but do some tracing before and after the call.
 	 * We MUST preserve the current register frame throughout this routine
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8e0756f50181..2464c3ed55a1 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -247,12 +247,6 @@ struct sched_info {
 # define SCHED_FIXEDPOINT_SHIFT	10
 # define SCHED_FIXEDPOINT_SCALE	(1L << SCHED_FIXEDPOINT_SHIFT)
 
-#ifdef ARCH_HAS_PREFETCH_SWITCH_STACK
-extern void prefetch_stack(struct task_struct *t);
-#else
-static inline void prefetch_stack(struct task_struct *t) { }
-#endif
-
 struct load_weight {
 	unsigned long weight;
 	u32 inv_weight;
-- 
2.7.4

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

* [PATCH 30/35] sched/headers: Remove <linux/sched.h> from <linux/sched/init.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (28 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 29/35] sched/core: Remove unused prefetch_stack() Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 31/35] sched/headers: Remove <linux/magic.h> from <linux/sched/task_stack.h> Ingo Molnar
                   ` (4 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

The <linux/sched/init.h> file is a self-contained header and users of
it either don't need <linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched/init.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/sched/init.h b/include/linux/sched/init.h
index f31d16075857..127215045285 100644
--- a/include/linux/sched/init.h
+++ b/include/linux/sched/init.h
@@ -1,8 +1,6 @@
 #ifndef _LINUX_SCHED_INIT_H
 #define _LINUX_SCHED_INIT_H
 
-#include <linux/sched.h>
-
 /*
  * Scheduler init related prototypes:
  */
-- 
2.7.4

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

* [PATCH 31/35] sched/headers: Remove <linux/magic.h> from <linux/sched/task_stack.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (29 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 30/35] sched/headers: Remove <linux/sched.h> from <linux/sched/init.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 32/35] sched/headers, timers: Remove the <linux/sysctl.h> include from <linux/timer.h> Ingo Molnar
                   ` (3 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

It's not used by any of the scheduler methods, but <linux/sched/task_stack.h>
needs it to pick up STACK_END_MAGIC.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2464c3ed55a1..7aabf53cd697 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -22,7 +22,6 @@
 #include <linux/task_io_accounting.h>
 #include <linux/latencytop.h>
 #include <linux/topology.h>
-#include <linux/magic.h>
 
 #include <asm/current.h>
 
-- 
2.7.4

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

* [PATCH 32/35] sched/headers, timers: Remove the <linux/sysctl.h> include from <linux/timer.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (30 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 31/35] sched/headers: Remove <linux/magic.h> from <linux/sched/task_stack.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 33/35] sched/headers, x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h> Ingo Molnar
                   ` (2 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

So we want to simplify <linux/sched.h>'s header dependencies, but one
roadblock of that is <linux/timer.h>'s inclusion of sysctl.h,
which brings in other, problematic headers.

Note that timer.h's inclusion of sysctl.h can be avoided if we
pre-declare ctl_table - so do that.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/timer.h          | 2 +-
 include/linux/user_namespace.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/timer.h b/include/linux/timer.h
index 51d601f192d4..6594ca6feb68 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -255,7 +255,7 @@ struct hrtimer;
 extern enum hrtimer_restart it_real_fn(struct hrtimer *);
 
 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
-#include <linux/sysctl.h>
+struct ctl_table;
 
 extern unsigned int sysctl_timer_migration;
 int timer_migration_handler(struct ctl_table *table, int write,
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index b3613ee889d9..404f6b44cf2b 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -5,6 +5,7 @@
 #include <linux/nsproxy.h>
 #include <linux/ns_common.h>
 #include <linux/sched.h>
+#include <linux/workqueue.h>
 #include <linux/rwsem.h>
 #include <linux/sysctl.h>
 #include <linux/err.h>
-- 
2.7.4

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

* [PATCH 33/35] sched/headers, x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (31 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 32/35] sched/headers, timers: Remove the <linux/sysctl.h> include from <linux/timer.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 34/35] sched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h> Ingo Molnar
  2017-02-08 18:51 ` [PATCH 35/35] sched/headers: Remove the <linux/topology.h> include from <linux/sched.h> Ingo Molnar
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

We want to simplify <linux/sched.h>'s header dependencies, but one
roadblock to that is <asm/apic.h>'s inclusion of pm.h,
which brings in other, problematic headers.

Remove it, as it appears to be entirely spurious, apic.h does not
actually make use of any PM facilities.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/apic.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 0c5fbc68e82d..95111dcd1283 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -2,7 +2,6 @@
 #define _ASM_X86_APIC_H
 
 #include <linux/cpumask.h>
-#include <linux/pm.h>
 
 #include <asm/alternative.h>
 #include <asm/cpufeature.h>
-- 
2.7.4

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

* [PATCH 34/35] sched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (32 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 33/35] sched/headers, x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  2017-02-08 18:51 ` [PATCH 35/35] sched/headers: Remove the <linux/topology.h> include from <linux/sched.h> Ingo Molnar
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

In our quest to simplify <linux/sched.h>'s header dependencies, remove
the <linux/wait.h> inclusion from <linux/hrtimer.h> - which does
not appear to be necessary, as hrtimer.h does not use waitqueues.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/hrtimer.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index cdab81ba29f8..d0a97bebfbd6 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -19,7 +19,6 @@
 #include <linux/ktime.h>
 #include <linux/init.h>
 #include <linux/list.h>
-#include <linux/wait.h>
 #include <linux/percpu.h>
 #include <linux/timer.h>
 #include <linux/timerqueue.h>
-- 
2.7.4

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

* [PATCH 35/35] sched/headers: Remove the <linux/topology.h> include from <linux/sched.h>
  2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
                   ` (33 preceding siblings ...)
  2017-02-08 18:51 ` [PATCH 34/35] sched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h> Ingo Molnar
@ 2017-02-08 18:51 ` Ingo Molnar
  34 siblings, 0 replies; 36+ messages in thread
From: Ingo Molnar @ 2017-02-08 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Linus Torvalds, Mike Galbraith, Oleg Nesterov,
	Peter Zijlstra, Thomas Gleixner

It's used only by a single (rarely used) inline function (task_node(p)),
which we can move to <linux/sched/topology.h>.

( Add <linux/nodemask.h>, because we rely on that. )

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h          | 7 +------
 include/linux/sched/topology.h | 7 +++++++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7aabf53cd697..4ba491501ddd 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -4,6 +4,7 @@
 #include <uapi/linux/sched.h>
 
 #include <linux/sched/prio.h>
+#include <linux/nodemask.h>
 
 #include <linux/mutex.h>
 #include <linux/plist.h>
@@ -21,7 +22,6 @@
 #include <linux/kcov.h>
 #include <linux/task_io_accounting.h>
 #include <linux/latencytop.h>
-#include <linux/topology.h>
 
 #include <asm/current.h>
 
@@ -1450,11 +1450,6 @@ static inline unsigned int task_cpu(const struct task_struct *p)
 #endif
 }
 
-static inline int task_node(const struct task_struct *p)
-{
-	return cpu_to_node(task_cpu(p));
-}
-
 extern void set_task_cpu(struct task_struct *p, unsigned int cpu);
 
 #else
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index 0d6fceff37bb..7d065abc7a47 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -1,6 +1,8 @@
 #ifndef _LINUX_SCHED_TOPOLOGY_H
 #define _LINUX_SCHED_TOPOLOGY_H
 
+#include <linux/topology.h>
+
 #include <linux/sched/idle.h>
 
 /*
@@ -216,4 +218,9 @@ static inline bool cpus_share_cache(int this_cpu, int that_cpu)
 
 #endif	/* !CONFIG_SMP */
 
+static inline int task_node(const struct task_struct *p)
+{
+	return cpu_to_node(task_cpu(p));
+}
+
 #endif /* _LINUX_SCHED_TOPOLOGY_H */
-- 
2.7.4

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

end of thread, other threads:[~2017-02-08 21:32 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 18:50 [PATCH 00/35] sched.h modernization -v2, phase #4: "Remove header dependencies" Ingo Molnar
2017-02-08 18:50 ` [PATCH 01/35] sched/headers: Remove <linux/sched.h> from <linux/sched/topology.h> Ingo Molnar
2017-02-08 18:50 ` [PATCH 02/35] sched/headers: Remove tsk_is_polling() Ingo Molnar
2017-02-08 18:50 ` [PATCH 03/35] sched/headers: Remove <linux/sched.h> from <linux/sched/wake_q.h> Ingo Molnar
2017-02-08 18:50 ` [PATCH 04/35] sched/headers: Remove <linux/sched.h> from <linux/sched/clock.h> Ingo Molnar
2017-02-08 18:50 ` [PATCH 05/35] sched/headers: Remove <linux/sched.h> and <linux/slab.h> from <linux/delayacct.h> Ingo Molnar
2017-02-08 18:50 ` [PATCH 06/35] sched/headers: Remove <linux/sched.h> from <linux/sched/loadavg.h> Ingo Molnar
2017-02-08 18:50 ` [PATCH 07/35] sched/headers: Remove <linux/sched.h> from <linux/sched/autogroup.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 08/35] sched/headers: Remove <linux/sched.h> from <linux/sched/mm.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 09/35] sched/headers: Remove <linux/sched.h> from <linux/sched/coredump.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 10/35] sched/headers: Remove unused 'task_can_switch_user()' prototype Ingo Molnar
2017-02-08 18:51 ` [PATCH 11/35] sched/headers: Remove <linux/sched.h> from <linux/sched/user.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 12/35] sched/headers: Remove #include <linux/capability.h> from <linux/sched.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 13/35] sched/headers: Remove <linux/cgroup-defs.h> " Ingo Molnar
2017-02-08 18:51 ` [PATCH 14/35] sched/headers: Remove <linux/sched.h> from <linux/sched/cpufreq.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 15/35] kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 16/35] sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 17/35] sched/headers: Remove <asm/ptrace.h> " Ingo Molnar
2017-02-08 18:51 ` [PATCH 18/35] sched/headers: Remove <linux/rtmutex.h> " Ingo Molnar
2017-02-08 18:51 ` [PATCH 19/35] sched/headers: Remove the <linux/gfp.h> include " Ingo Molnar
2017-02-08 18:51 ` [PATCH 20/35] sched/headers: Remove <linux/sched.h> from <linux/sched/stat.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 21/35] sched/headers: Remove <linux/sched.h> from <linux/sched/nohz.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 22/35] sched/headers: Remove <linux/sched.h> from <linux/sched/debug.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 23/35] sched/headers: Remove <linux/sched.h> from <linux/sched/hotplug.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 24/35] sched/headers: Remove the runqueue_is_locked() prototype Ingo Molnar
2017-02-08 18:51 ` [PATCH 25/35] sched/headers: Remove <linux/rwsem.h> from <linux/sched.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 26/35] sched/headers: Remove <linux/signal.h> " Ingo Molnar
2017-02-08 18:51 ` [PATCH 27/35] sched/headers: Remove the 'init_pid_ns' prototype " Ingo Molnar
2017-02-08 18:51 ` [PATCH 28/35] sched/headers: Remove <linux/rculist.h> " Ingo Molnar
2017-02-08 18:51 ` [PATCH 29/35] sched/core: Remove unused prefetch_stack() Ingo Molnar
2017-02-08 18:51 ` [PATCH 30/35] sched/headers: Remove <linux/sched.h> from <linux/sched/init.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 31/35] sched/headers: Remove <linux/magic.h> from <linux/sched/task_stack.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 32/35] sched/headers, timers: Remove the <linux/sysctl.h> include from <linux/timer.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 33/35] sched/headers, x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 34/35] sched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h> Ingo Molnar
2017-02-08 18:51 ` [PATCH 35/35] sched/headers: Remove the <linux/topology.h> include from <linux/sched.h> Ingo Molnar

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.