sched/debug: Make sysrq prints of sched debug data optional

Calls to sysrq_sched_debug_show() can yield rather verbose output
which contributes to log spew and, under heavy load, may increase
the chances of a watchdog bark.

Make printing of this data optional with the introduction of a
new Kconfig, CONFIG_SYSRQ_SCHED_DEBUG.

Change-Id: I5f54d901d0dea403109f7ac33b8881d967a899ed
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This commit is contained in:
Matt Wagantall 2013-12-05 20:01:32 -08:00
parent 3810b77ce5
commit bfc9623ffa
4 changed files with 14 additions and 1 deletions

View File

@ -4931,7 +4931,7 @@ void show_state_filter(unsigned long state_filter)
touch_all_softlockup_watchdogs();
#ifdef CONFIG_SCHED_DEBUG
#ifdef CONFIG_SYSRQ_SCHED_DEBUG
sysrq_sched_debug_show();
#endif
rcu_read_unlock();

View File

@ -374,10 +374,12 @@ static int sched_debug_show(struct seq_file *m, void *v)
return 0;
}
#ifdef CONFIG_SYSRQ_SCHED_DEBUG
void sysrq_sched_debug_show(void)
{
sched_debug_show(NULL, NULL);
}
#endif
static int sched_debug_open(struct inode *inode, struct file *filp)
{

View File

@ -872,7 +872,9 @@ static inline void idle_balance(int cpu, struct rq *rq)
#endif
#ifdef CONFIG_SYSRQ_SCHED_DEBUG
extern void sysrq_sched_debug_show(void);
#endif
extern void sched_init_granularity(void);
extern void update_max_interval(void);
extern void update_group_power(struct sched_domain *sd, int cpu);

View File

@ -291,6 +291,15 @@ config SCHED_DEBUG
that can help debug the scheduler. The runtime overhead of this
option is minimal.
config SYSRQ_SCHED_DEBUG
bool "Print scheduling debugging info from sysrq-trigger"
depends on SCHED_DEBUG
default y
help
If you say Y here, the "show-task-states(T)" and
"show-blocked-tasks(W)" sysrq-triggers will print additional
scheduling statistics.
config SCHEDSTATS
bool "Collect scheduler statistics"
depends on DEBUG_KERNEL && PROC_FS