diff options
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r-- | kernel/sched_debug.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index efb84409bc43..67f95aada4b9 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -184,7 +184,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
184 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "exec_clock", | 184 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "exec_clock", |
185 | SPLIT_NS(cfs_rq->exec_clock)); | 185 | SPLIT_NS(cfs_rq->exec_clock)); |
186 | 186 | ||
187 | spin_lock_irqsave(&rq->lock, flags); | 187 | raw_spin_lock_irqsave(&rq->lock, flags); |
188 | if (cfs_rq->rb_leftmost) | 188 | if (cfs_rq->rb_leftmost) |
189 | MIN_vruntime = (__pick_next_entity(cfs_rq))->vruntime; | 189 | MIN_vruntime = (__pick_next_entity(cfs_rq))->vruntime; |
190 | last = __pick_last_entity(cfs_rq); | 190 | last = __pick_last_entity(cfs_rq); |
@@ -192,7 +192,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
192 | max_vruntime = last->vruntime; | 192 | max_vruntime = last->vruntime; |
193 | min_vruntime = cfs_rq->min_vruntime; | 193 | min_vruntime = cfs_rq->min_vruntime; |
194 | rq0_min_vruntime = cpu_rq(0)->cfs.min_vruntime; | 194 | rq0_min_vruntime = cpu_rq(0)->cfs.min_vruntime; |
195 | spin_unlock_irqrestore(&rq->lock, flags); | 195 | raw_spin_unlock_irqrestore(&rq->lock, flags); |
196 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "MIN_vruntime", | 196 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "MIN_vruntime", |
197 | SPLIT_NS(MIN_vruntime)); | 197 | SPLIT_NS(MIN_vruntime)); |
198 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "min_vruntime", | 198 | SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "min_vruntime", |
@@ -285,12 +285,16 @@ static void print_cpu(struct seq_file *m, int cpu) | |||
285 | 285 | ||
286 | #ifdef CONFIG_SCHEDSTATS | 286 | #ifdef CONFIG_SCHEDSTATS |
287 | #define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n); | 287 | #define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n); |
288 | #define P64(n) SEQ_printf(m, " .%-30s: %Ld\n", #n, rq->n); | ||
288 | 289 | ||
289 | P(yld_count); | 290 | P(yld_count); |
290 | 291 | ||
291 | P(sched_switch); | 292 | P(sched_switch); |
292 | P(sched_count); | 293 | P(sched_count); |
293 | P(sched_goidle); | 294 | P(sched_goidle); |
295 | #ifdef CONFIG_SMP | ||
296 | P64(avg_idle); | ||
297 | #endif | ||
294 | 298 | ||
295 | P(ttwu_count); | 299 | P(ttwu_count); |
296 | P(ttwu_local); | 300 | P(ttwu_local); |
@@ -305,6 +309,12 @@ static void print_cpu(struct seq_file *m, int cpu) | |||
305 | print_rq(m, rq, cpu); | 309 | print_rq(m, rq, cpu); |
306 | } | 310 | } |
307 | 311 | ||
312 | static const char *sched_tunable_scaling_names[] = { | ||
313 | "none", | ||
314 | "logaritmic", | ||
315 | "linear" | ||
316 | }; | ||
317 | |||
308 | static int sched_debug_show(struct seq_file *m, void *v) | 318 | static int sched_debug_show(struct seq_file *m, void *v) |
309 | { | 319 | { |
310 | u64 now = ktime_to_ns(ktime_get()); | 320 | u64 now = ktime_to_ns(ktime_get()); |
@@ -330,6 +340,10 @@ static int sched_debug_show(struct seq_file *m, void *v) | |||
330 | #undef PN | 340 | #undef PN |
331 | #undef P | 341 | #undef P |
332 | 342 | ||
343 | SEQ_printf(m, " .%-40s: %d (%s)\n", "sysctl_sched_tunable_scaling", | ||
344 | sysctl_sched_tunable_scaling, | ||
345 | sched_tunable_scaling_names[sysctl_sched_tunable_scaling]); | ||
346 | |||
333 | for_each_online_cpu(cpu) | 347 | for_each_online_cpu(cpu) |
334 | print_cpu(m, cpu); | 348 | print_cpu(m, cpu); |
335 | 349 | ||
@@ -395,7 +409,6 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) | |||
395 | PN(se.sum_exec_runtime); | 409 | PN(se.sum_exec_runtime); |
396 | PN(se.avg_overlap); | 410 | PN(se.avg_overlap); |
397 | PN(se.avg_wakeup); | 411 | PN(se.avg_wakeup); |
398 | PN(se.avg_running); | ||
399 | 412 | ||
400 | nr_switches = p->nvcsw + p->nivcsw; | 413 | nr_switches = p->nvcsw + p->nivcsw; |
401 | 414 | ||
@@ -419,7 +432,6 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) | |||
419 | P(se.nr_failed_migrations_running); | 432 | P(se.nr_failed_migrations_running); |
420 | P(se.nr_failed_migrations_hot); | 433 | P(se.nr_failed_migrations_hot); |
421 | P(se.nr_forced_migrations); | 434 | P(se.nr_forced_migrations); |
422 | P(se.nr_forced2_migrations); | ||
423 | P(se.nr_wakeups); | 435 | P(se.nr_wakeups); |
424 | P(se.nr_wakeups_sync); | 436 | P(se.nr_wakeups_sync); |
425 | P(se.nr_wakeups_migrate); | 437 | P(se.nr_wakeups_migrate); |
@@ -495,7 +507,6 @@ void proc_sched_set_task(struct task_struct *p) | |||
495 | p->se.nr_failed_migrations_running = 0; | 507 | p->se.nr_failed_migrations_running = 0; |
496 | p->se.nr_failed_migrations_hot = 0; | 508 | p->se.nr_failed_migrations_hot = 0; |
497 | p->se.nr_forced_migrations = 0; | 509 | p->se.nr_forced_migrations = 0; |
498 | p->se.nr_forced2_migrations = 0; | ||
499 | p->se.nr_wakeups = 0; | 510 | p->se.nr_wakeups = 0; |
500 | p->se.nr_wakeups_sync = 0; | 511 | p->se.nr_wakeups_sync = 0; |
501 | p->se.nr_wakeups_migrate = 0; | 512 | p->se.nr_wakeups_migrate = 0; |