Messages in this thread | | | Date | Mon, 1 Feb 2016 23:18:01 +0100 | From | Peter Zijlstra <> | Subject | Re: [RFC][PATCH 4/4] sched: Add debugfs/sched/deadline_bw file to show current bandwidths |
| |
On Mon, Feb 01, 2016 at 03:26:28PM -0500, Steven Rostedt wrote: > +static void *dl_next(struct seq_file *m, void *v, loff_t *pos) > +{ > + long cpu = (long)v; > + > + /* to keep from returning zero, v is always cpu + 1 */ > + cpu--; > + cpu = cpumask_next(cpu, cpu_possible_mask); > + > + (*pos)++; > + > + if (cpu >= num_possible_cpus())
And that wants to be: nr_cpu_ids, imagine the bitmap having holes in.
> + cpu = 0; > + else > + cpu++; > + > + return (void *)cpu; > +}
| |