]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sched-proc-sched_stat-fails-on-very-very-large-machines-v2
authorNathan Zimmer <nzimmer@sgi.com>
Wed, 20 Feb 2013 02:13:49 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:14 +0000 (16:52 +1100)
v2: Took Andrew's suggestion to add comments, fix memleak

Signed-off-by: Nathan Zimmer <nzimmer@sgi.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/sched/stats.c

index 7eecdc7bb7754959ac91b7855b466eef90231762..80226cc1798c4ef17f968110f0b5fff760d01982 100644 (file)
@@ -81,6 +81,13 @@ static int show_schedstat(struct seq_file *seq, void *v)
        return 0;
 }
 
+/*
+ * This itererator needs some explination.
+ * It returns 1 for the header position.
+ * This means 2 is cpu 0.
+ * In a hotplugged system some cpus, including cpu 0, may be missing so we have
+ * to use cpumask_* to iterate over the cpus.
+ */
 static void *schedstat_start(struct seq_file *file, loff_t *offset)
 {
        unsigned long n = *offset;