diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-23 17:24:26 +0000 | 
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-24 23:45:32 +0000 | 
| commit | bdd92c9ad287e03a2ec52f5a89c470cd5caae1c2 (patch) | |
| tree | 38d863507e900fb2ccac4c22fcf8934271c051b5 /kernel/sched_debug.c | |
| parent | a37f2f87edc1b6e5932becf6e51535d36b690f2a (diff) | |
| parent | 8e934dbf264418afe4d1dff34ce074ecc14280db (diff) | |
| download | olio-linux-3.10-bdd92c9ad287e03a2ec52f5a89c470cd5caae1c2.tar.xz olio-linux-3.10-bdd92c9ad287e03a2ec52f5a89c470cd5caae1c2.zip  | |
Merge branch 'drm-intel-fixes' into drm-intel-next
Merge important suspend and resume regression fixes and resolve the
small conflict.
Conflicts:
	drivers/gpu/drm/i915/i915_dma.c
Diffstat (limited to 'kernel/sched_debug.c')
| -rw-r--r-- | kernel/sched_debug.c | 42 | 
1 files changed, 41 insertions, 1 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 1dfae3d014b..eb6cb8edd07 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c @@ -16,6 +16,8 @@  #include <linux/kallsyms.h>  #include <linux/utsname.h> +static DEFINE_SPINLOCK(sched_debug_lock); +  /*   * This allows printing both to /proc/sched_debug and   * to the console @@ -86,6 +88,26 @@ static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group  }  #endif +#ifdef CONFIG_CGROUP_SCHED +static char group_path[PATH_MAX]; + +static char *task_group_path(struct task_group *tg) +{ +	if (autogroup_path(tg, group_path, PATH_MAX)) +		return group_path; + +	/* +	 * May be NULL if the underlying cgroup isn't fully-created yet +	 */ +	if (!tg->css.cgroup) { +		group_path[0] = '\0'; +		return group_path; +	} +	cgroup_path(tg->css.cgroup, group_path, PATH_MAX); +	return group_path; +} +#endif +  static void  print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)  { @@ -108,6 +130,9 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)  	SEQ_printf(m, "%15Ld %15Ld %15Ld.%06ld %15Ld.%06ld %15Ld.%06ld",  		0LL, 0LL, 0LL, 0L, 0LL, 0L, 0LL, 0L);  #endif +#ifdef CONFIG_CGROUP_SCHED +	SEQ_printf(m, " %s", task_group_path(task_group(p))); +#endif  	SEQ_printf(m, "\n");  } @@ -144,7 +169,11 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)  	struct sched_entity *last;  	unsigned long flags; +#ifdef CONFIG_FAIR_GROUP_SCHED +	SEQ_printf(m, "\ncfs_rq[%d]:%s\n", cpu, task_group_path(cfs_rq->tg)); +#else  	SEQ_printf(m, "\ncfs_rq[%d]:\n", cpu); +#endif  	SEQ_printf(m, "  .%-30s: %Ld.%06ld\n", "exec_clock",  			SPLIT_NS(cfs_rq->exec_clock)); @@ -191,7 +220,11 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)  void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq)  { +#ifdef CONFIG_RT_GROUP_SCHED +	SEQ_printf(m, "\nrt_rq[%d]:%s\n", cpu, task_group_path(rt_rq->tg)); +#else  	SEQ_printf(m, "\nrt_rq[%d]:\n", cpu); +#endif  #define P(x) \  	SEQ_printf(m, "  .%-30s: %Ld\n", #x, (long long)(rt_rq->x)) @@ -212,6 +245,7 @@ extern __read_mostly int sched_clock_running;  static void print_cpu(struct seq_file *m, int cpu)  {  	struct rq *rq = cpu_rq(cpu); +	unsigned long flags;  #ifdef CONFIG_X86  	{ @@ -262,14 +296,20 @@ static void print_cpu(struct seq_file *m, int cpu)  	P(ttwu_count);  	P(ttwu_local); -	P(bkl_count); +	SEQ_printf(m, "  .%-30s: %d\n", "bkl_count", +				rq->rq_sched_info.bkl_count);  #undef P +#undef P64  #endif +	spin_lock_irqsave(&sched_debug_lock, flags);  	print_cfs_stats(m, cpu);  	print_rt_stats(m, cpu); +	rcu_read_lock();  	print_rq(m, rq, cpu); +	rcu_read_unlock(); +	spin_unlock_irqrestore(&sched_debug_lock, flags);  }  static const char *sched_tunable_scaling_names[] = {  |