Re: get_online_cpus() && workqueues

From: Oleg Nesterov
Date: Mon Apr 28 2008 - 08:40:56 EST


On 04/28, Gautham R Shenoy wrote:
>
> On Mon, Apr 28, 2008 at 02:56:49PM +0400, Oleg Nesterov wrote:
> >
> > Yes, possible, but it is not nice that work->func() can't just use
> > get_online_cpus()...
>
> Like I said, it depends on what they want to use it for. If it is just
> protection against the changing of the cpu_online_map then, it's simple
> as using get_online_map(), i.e the patch you provided.
>
> BTW, the other thing I am concerned about is the
> naming. Dont the names get_online_cpus() and get_online_map()
> appear very similar. The last thing we want is driver writers getting
> confused over what API to use!

Yes, yes, please forget this patch. I don't like 2 very similar nested
locks, this was a bad idea. I am talking about another (uncompiled)
patch I sent.

> > What do you think about another patch I sent? I am not happy with it,
> > and it certainly uglifies cpu.c, but it is simple...
>
> I am currently testing out the patchstack sent
> by peterz. Once that's done I will see if I can integrate this patch
> with the previous patches and repost the whole series.

OK.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/