The patch titled Subject: timer_list-convert-timer-list-to-be-a-proper-seq_file-v2 has been added to the -mm tree. Its filename is timer_list-convert-timer-list-to-be-a-proper-seq_file-v2.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Nathan Zimmer <nzimmer@xxxxxxx> Subject: timer_list-convert-timer-list-to-be-a-proper-seq_file-v2 v2: Added comments on the iteration. Signed-off-by: Nathan Zimmer <nzimmer@xxxxxxx> Cc: John Stultz <johnstul@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Dave Jones <davej@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/time/timer_list.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff -puN kernel/time/timer_list.c~timer_list-convert-timer-list-to-be-a-proper-seq_file-v2 kernel/time/timer_list.c --- a/kernel/time/timer_list.c~timer_list-convert-timer-list-to-be-a-proper-seq_file-v2 +++ a/kernel/time/timer_list.c @@ -274,6 +274,19 @@ static int timer_list_show(struct seq_fi return 0; } +/* + * This itererator really needs some explination since it is offset and has + * two passes one of which is controlled by a config option. + * In a hotplugged system some cpus, including cpu 0, may be missing so we have + * to use cpumask_* to iterate over the cpus. + * For the first pass: + * It returns 1 for the header position. + * For cpu 0 it returns 2 and the final possible cpu would be nr_cpu_ids + 1. + * On the second pass: + * It returnes nr_cpu_ids + 1 for the second header position. + * For cpu 0 it returns nr_cpu_ids + 2 + * The final possible cpu would be nr_cpu_ids + nr_cpu_ids + 2. + */ static void *timer_list_start(struct seq_file *file, loff_t *offset) { unsigned long n = *offset; _ Patches currently in -mm which might be from nzimmer@xxxxxxx are timer_list-split-timer_list_show_tickdevices.patch timer_list-convert-timer-list-to-be-a-proper-seq_file.patch timer_list-convert-timer-list-to-be-a-proper-seq_file-fix.patch timer_list-convert-timer-list-to-be-a-proper-seq_file-v2.patch timer_list-convert-timer-list-to-be-a-proper-seq_file-v2-fix.patch sched-proc-sched_stat-fails-on-very-very-large-machines.patch sched-proc-sched_stat-fails-on-very-very-large-machines-fix.patch sched-proc-sched_stat-fails-on-very-very-large-machines-v2.patch sched-proc-sched_stat-fails-on-very-very-large-machines-v2-fix.patch sched-proc-sched_debug-fails-on-very-very-large-machines.patch sched-proc-sched_debug-fails-on-very-very-large-machines-fix.patch sched-proc-sched_debug-fails-on-very-very-large-machines-v2.patch sched-proc-sched_debug-fails-on-very-very-large-machines-v2-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html