Re: [PATCH 2/4] generic-smp: remove kmalloc usage

From: Ingo Molnar
Date: Tue Feb 17 2009 - 04:44:44 EST



* Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:

> On Mon, 2009-02-16 at 16:40 -0800, Linus Torvalds wrote:
> >
> > On Mon, 16 Feb 2009, Peter Zijlstra wrote:
> > >
> > > Now that there is no strict need for kmalloc anymore, and nobody seems to
> > > rely it for the queueing behaviour, remove it.
> >
> > Peter, I really hate this series.
> >
> > Why?
> >
> > In 1/4 you introduce that cfd RCU thing, and then in 2/4 you remove it
> > again.
>
> Ah, no, I don't actually. I remove the kmalloc+call_rcu stuff in 2, not
> the newly cfd mini rcu thing.
>
> > I realize that you seem to do that in order to do some incremental
> > step-wise changes, but quite frankly, it just complicates the whole series
> > and makes the patches much harder to read and follow.
> >
> > Why don't you just combine patches 1&2? That split-up seems to just
> > confuse things. At least it confuses me. Why does it happen?
>
> The idea was to remove the necessity for kmalloc() in patch 1,
> and then remove kmalloc() in patch 2.
>
> If you prefer I can fold them, no problem.
>
> But as you might have seen, Oleg has been punching holes in my
> #1, so I guess I'm back to the drawing board no matter what
> :-)

I think the kmalloc() is clearly ugly, we should remove it, and
if someone wants to add it we want to see _hard numbers_ that
it's worth the ugliness. I.e. lets go with the two patches i
posted, they are obvious and tested.

We should not bend backwards trying to preserve that kmalloc()
[and prove that it's safe and race-free] - i.e. the burden of
proof is on the person insisting that it's needed, not on the
person wanting to remove it.

Ingo
--
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/