[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070726183058.GA246@tv-sign.ru>
Date: Thu, 26 Jul 2007 22:30:58 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] make schedule_on_each_cpu() look like on_each_cpu()
On 07/26, Oleg Nesterov wrote:
>
> On 07/26, Peter Zijlstra wrote:
> >
> > -int schedule_on_each_cpu(work_func_t func)
> > +int schedule_on_each_cpu(void (*func)(void *info), void *info, int retry, int wait)
> > {
> > int cpu;
> > - struct work_struct *works;
> > + struct schedule_on_each_cpu_work **works;
> > + int err = 0;
> >
> > - works = alloc_percpu(struct work_struct);
> > + works = kzalloc(sizeof(void *)*nr_cpu_ids, GFP_KERNEL);
>
> Not a comment, but a question: why do we need nr_cpu_ids at all?
> num_possible_cpus() looks more "correct" if cpu_possible_map has
> holes (not sure this can happen in practice).
OOPS, I am stupid, please ignore. Of course, we need the highest CPU
number, not num_possible_cpus().
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists