[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160201221801.GA6357@twins.programming.kicks-ass.net>
Date: Mon, 1 Feb 2016 23:18:01 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Juri Lelli <juri.lelli@...il.com>,
Clark Williams <williams@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
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;
> +}
Powered by blists - more mailing lists