diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-02-05 14:07:04 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-03-03 03:45:23 +0300 |
commit | a2d7a7463c38dd14b845721aac3583a26a97c66d (patch) | |
tree | a71aebf1aa53734f74220f59b0ec0cd1aacbc547 /include/linux/sched | |
parent | 1050b27c52f615bc0e772b3119881e5304ccde6b (diff) | |
download | linux-a2d7a7463c38dd14b845721aac3583a26a97c66d.tar.xz |
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: 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>
Diffstat (limited to 'include/linux/sched')
-rw-r--r-- | include/linux/sched/stat.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/sched/stat.h b/include/linux/sched/stat.h index 0d52ceb6d3ae..d8cedf27083e 100644 --- a/include/linux/sched/stat.h +++ b/include/linux/sched/stat.h @@ -21,4 +21,20 @@ extern unsigned long nr_iowait(void); extern unsigned long nr_iowait_cpu(int cpu); 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 */ |