Commit a2d7a746 authored by Ingo Molnar's avatar Ingo Molnar

sched/headers: Move sched_info_on() and force_schedstat_enabled() from...

sched/headers: Move sched_info_on() and force_schedstat_enabled() from <linux/sched.h> to <linux/sched/stat.h>

These APIs are not core scheduler but scheduler statistics related.
Acked-by: default avatarLinus 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 1050b27c
...@@ -254,22 +254,6 @@ struct sched_info { ...@@ -254,22 +254,6 @@ struct sched_info {
}; };
#endif /* CONFIG_SCHED_INFO */ #endif /* CONFIG_SCHED_INFO */
static inline int sched_info_on(void)
{
#ifdef CONFIG_SCHEDSTATS
return 1;
#elif defined(CONFIG_TASK_DELAY_ACCT)
extern int delayacct_on;
return delayacct_on;
#else
return 0;
#endif
}
#ifdef CONFIG_SCHEDSTATS
void force_schedstat_enabled(void);
#endif
/* /*
* Integer metrics need fixed point arithmetic, e.g., sched/fair * Integer metrics need fixed point arithmetic, e.g., sched/fair
* has a few: load, load_avg, util_avg, freq, and capacity. * has a few: load, load_avg, util_avg, freq, and capacity.
......
...@@ -21,4 +21,20 @@ extern unsigned long nr_iowait(void); ...@@ -21,4 +21,20 @@ extern unsigned long nr_iowait(void);
extern unsigned long nr_iowait_cpu(int cpu); extern unsigned long nr_iowait_cpu(int cpu);
extern void get_iowait_load(unsigned long *nr_waiters, unsigned long *load); extern void get_iowait_load(unsigned long *nr_waiters, unsigned long *load);
static inline int sched_info_on(void)
{
#ifdef CONFIG_SCHEDSTATS
return 1;
#elif defined(CONFIG_TASK_DELAY_ACCT)
extern int delayacct_on;
return delayacct_on;
#else
return 0;
#endif
}
#ifdef CONFIG_SCHEDSTATS
void force_schedstat_enabled(void);
#endif
#endif /* _LINUX_SCHED_STAT_H */ #endif /* _LINUX_SCHED_STAT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment