diff options
author | Nathan Zimmer <nzimmer@sgi.com> | 2013-02-07 12:26:01 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-02-14 15:25:03 +1100 |
commit | 1c824550ba61513f4d78f16bf2f3d3e2a3691413 (patch) | |
tree | a1e81f4db7e431a1620cc073a6ce657253207488 /kernel | |
parent | a22f8abadb2ee1b2923a700137c34ef9985852ee (diff) |
sched-proc-sched_stat-fails-on-very-very-large-machines-v2
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/stats.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c index 7eecdc7bb775..80226cc1798c 100644 --- a/kernel/sched/stats.c +++ b/kernel/sched/stats.c @@ -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; |