diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2016-06-04 01:58:40 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-06-08 15:31:58 +0300 |
commit | 9c57259117b9c25472a3fa6d5a14d6bb3b647e87 (patch) | |
tree | 470198157c2f40c21ab02f1b671008747a538b6c /kernel/kprobes.c | |
parent | c8ae067f2635be0f8c7e5db1bb74b757d623e05b (diff) | |
download | linux-9c57259117b9c25472a3fa6d5a14d6bb3b647e87.tar.xz |
sched/debug: Fix /proc/sched_debug regression
Commit:
cb2517653fcc ("sched/debug: Make schedstats a runtime tunable that is disabled by default")
... introduced a bug when CONFIG_SCHEDSTATS is enabled and the
runtime tunable is disabled (which is the default).
The wait-time, sum-exec, and sum-sleep fields are missing from the
/proc/sched_debug file in the runnable_tasks section.
Fix it with a new schedstat_val() macro which returns the field value
when schedstats is enabled and zero otherwise. The macro works with
both SCHEDSTATS and !SCHEDSTATS. I put the macro in stats.h since it
might end up being useful in other places.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: cb2517653fcc ("sched/debug: Make schedstats a runtime tunable that is disabled by default")
Link: http://lkml.kernel.org/r/bcda7c2790cf2ccbe586a28c02dd7b6fe7749a2b.1464994423.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/kprobes.c')
0 files changed, 0 insertions, 0 deletions