sched/headers: Standardize kernel/sched/sched.h header dependencies
kernel/sched/sched.h is a weird mix of ad-hoc headers included in the middle of the header. Two of them rely on being included in the middle of kernel/sched/sched.h, due to definitions they require: - "stat.h" needs the rq definitions. - "autogroup.h" needs the task_group definition. Move the inclusion of these two files out of kernel/sched/sched.h, and include them in all files that require them. Move of the rest of the header dependencies to the top of the kernel/sched/sched.h file. Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Peter Zijlstra <peterz@infradead.org>
This commit is contained in:
@@ -13,6 +13,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
|
|
||||||
|
#include "autogroup.h"
|
||||||
|
#include "stats.h"
|
||||||
#include "pelt.h"
|
#include "pelt.h"
|
||||||
|
|
||||||
#include "idle.c"
|
#include "idle.c"
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
#include "sched-pelt.h"
|
#include "sched-pelt.h"
|
||||||
|
#include "stats.h"
|
||||||
|
#include "autogroup.h"
|
||||||
|
|
||||||
#include <linux/sched_clock.h>
|
#include <linux/sched_clock.h>
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
#undef CREATE_TRACE_POINTS
|
#undef CREATE_TRACE_POINTS
|
||||||
|
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
|
#include "stats.h"
|
||||||
|
#include "autogroup.h"
|
||||||
|
|
||||||
#include <linux/nospec.h>
|
#include <linux/nospec.h>
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
* Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
|
* Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
|
||||||
*/
|
*/
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
|
#include "stats.h"
|
||||||
|
#include "autogroup.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Targeted preemption latency for CPU-bound tasks:
|
* Targeted preemption latency for CPU-bound tasks:
|
||||||
|
|||||||
@@ -96,11 +96,20 @@
|
|||||||
# include <asm/paravirt.h>
|
# include <asm/paravirt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <trace/events/sched.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_CGROUP_SCHED
|
||||||
|
#include <linux/cgroup.h>
|
||||||
|
#include <linux/psi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SCHED_DEBUG
|
||||||
|
# include <linux/static_key.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "cpupri.h"
|
#include "cpupri.h"
|
||||||
#include "cpudeadline.h"
|
#include "cpudeadline.h"
|
||||||
|
|
||||||
#include <trace/events/sched.h>
|
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_DEBUG
|
#ifdef CONFIG_SCHED_DEBUG
|
||||||
# define SCHED_WARN_ON(x) WARN_ONCE(x, #x)
|
# define SCHED_WARN_ON(x) WARN_ONCE(x, #x)
|
||||||
#else
|
#else
|
||||||
@@ -417,9 +426,6 @@ extern bool dl_cpu_busy(unsigned int cpu);
|
|||||||
|
|
||||||
#ifdef CONFIG_CGROUP_SCHED
|
#ifdef CONFIG_CGROUP_SCHED
|
||||||
|
|
||||||
#include <linux/cgroup.h>
|
|
||||||
#include <linux/psi.h>
|
|
||||||
|
|
||||||
struct cfs_rq;
|
struct cfs_rq;
|
||||||
struct rt_rq;
|
struct rt_rq;
|
||||||
|
|
||||||
@@ -1919,9 +1925,6 @@ extern void flush_smp_call_function_from_idle(void);
|
|||||||
static inline void flush_smp_call_function_from_idle(void) { }
|
static inline void flush_smp_call_function_from_idle(void) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "stats.h"
|
|
||||||
#include "autogroup.h"
|
|
||||||
|
|
||||||
#if defined(CONFIG_SCHED_CORE) && defined(CONFIG_SCHEDSTATS)
|
#if defined(CONFIG_SCHED_CORE) && defined(CONFIG_SCHEDSTATS)
|
||||||
|
|
||||||
extern void __sched_core_account_forceidle(struct rq *rq);
|
extern void __sched_core_account_forceidle(struct rq *rq);
|
||||||
@@ -2016,7 +2019,6 @@ static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu)
|
|||||||
* Tunables that become constants when CONFIG_SCHED_DEBUG is off:
|
* Tunables that become constants when CONFIG_SCHED_DEBUG is off:
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_SCHED_DEBUG
|
#ifdef CONFIG_SCHED_DEBUG
|
||||||
# include <linux/static_key.h>
|
|
||||||
# define const_debug __read_mostly
|
# define const_debug __read_mostly
|
||||||
#else
|
#else
|
||||||
# define const_debug const
|
# define const_debug const
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
#ifndef _KERNEL_STATS_H
|
#ifndef _KERNEL_STATS_H
|
||||||
#define _KERNEL_STATS_H
|
#define _KERNEL_STATS_H
|
||||||
|
|
||||||
#ifdef CONFIG_SCHEDSTATS
|
|
||||||
|
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_SCHEDSTATS
|
||||||
|
|
||||||
extern struct static_key_false sched_schedstats;
|
extern struct static_key_false sched_schedstats;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user