Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 325ea10c authored by Ingo Molnar's avatar Ingo Molnar
Browse files

sched/headers: Simplify and clean up header usage in the scheduler



Do the following cleanups and simplifications:

 - sched/sched.h already includes <asm/paravirt.h>, so no need to
   include it in sched/core.c again.

 - order the <linux/sched/*.h> headers alphabetically

 - add all <linux/sched/*.h> headers to kernel/sched/sched.h

 - remove all unnecessary includes from the .c files that
   are already included in kernel/sched/sched.h.

Finally, make all scheduler .c files use a single common header:

  #include "sched.h"

... which now contains a union of the relied upon headers.

This makes the various .c files easier to read and easier to handle.

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: default avatarIngo Molnar <mingo@kernel.org>
parent 97fb7a0a
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_SCHED_DEADLINE_H
#define _LINUX_SCHED_DEADLINE_H

#include <linux/sched.h>


/*
/*
 * SCHED_DEADLINE tasks has negative priorities, reflecting
 * SCHED_DEADLINE tasks has negative priorities, reflecting
@@ -28,5 +24,3 @@ static inline bool dl_time_before(u64 a, u64 b)
{
{
	return (s64)(a - b) < 0;
	return (s64)(a - b) < 0;
}
}

#endif /* _LINUX_SCHED_DEADLINE_H */
+3 −6
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0
#include <linux/proc_fs.h>
/*
#include <linux/seq_file.h>
 * Auto-group scheduling implementation:
#include <linux/utsname.h>
 */
#include <linux/security.h>
#include <linux/export.h>

#include "sched.h"
#include "sched.h"


unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1;
unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1;
+0 −4
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CONFIG_SCHED_AUTOGROUP
#ifdef CONFIG_SCHED_AUTOGROUP


#include <linux/kref.h>
#include <linux/rwsem.h>
#include <linux/sched/autogroup.h>

struct autogroup {
struct autogroup {
	/*
	/*
	 * Reference doesn't mean how many threads attach to this
	 * Reference doesn't mean how many threads attach to this
+1 −13
Original line number Original line Diff line number Diff line
@@ -52,19 +52,7 @@
 * that is otherwise invisible (TSC gets stopped).
 * that is otherwise invisible (TSC gets stopped).
 *
 *
 */
 */
#include <linux/spinlock.h>
#include "sched.h"
#include <linux/hardirq.h>
#include <linux/export.h>
#include <linux/percpu.h>
#include <linux/ktime.h>
#include <linux/sched.h>
#include <linux/nmi.h>
#include <linux/sched/clock.h>
#include <linux/static_key.h>
#include <linux/workqueue.h>
#include <linux/compiler.h>
#include <linux/tick.h>
#include <linux/init.h>


/*
/*
 * Scheduler clock - returns current time in nanosec units.
 * Scheduler clock - returns current time in nanosec units.
+1 −4
Original line number Original line Diff line number Diff line
@@ -11,10 +11,7 @@
 * typically be used for exclusion which gives rise to priority inversion.
 * typically be used for exclusion which gives rise to priority inversion.
 * Waiting for completion is a typically sync point, but not an exclusion point.
 * Waiting for completion is a typically sync point, but not an exclusion point.
 */
 */

#include "sched.h"
#include <linux/sched/signal.h>
#include <linux/sched/debug.h>
#include <linux/completion.h>


/**
/**
 * complete: - signals a single thread waiting on this completion
 * complete: - signals a single thread waiting on this completion
Loading