[PATCH v2 2/2] sched/debug: always show nr_migrations

From: Josh Poimboeuf
Date: Fri Jun 03 2016 - 18:58:57 EST


The nr_migrations field is updated independently of CONFIG_SCHEDSTATS,
so it can be displayed regardless.

Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
kernel/sched/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 0368c39..2a0a999 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -879,9 +879,9 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)

nr_switches = p->nvcsw + p->nivcsw;

-#ifdef CONFIG_SCHEDSTATS
P(se.nr_migrations);

+#ifdef CONFIG_SCHEDSTATS
if (schedstat_enabled()) {
u64 avg_atom, avg_per_cpu;

--
2.4.11