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

From: Linus Torvalds
Date: Thu Feb 19 2009 - 11:54:44 EST




On Thu, 19 Feb 2009, Rusty Russell wrote:
>
> So if we care about the kmalloc, why didn't we see benchmarks when we
> switched from the x86 smp_call_function_mask to the generic one? Or did
> I just miss them (there's nothing in the git commit).

I don't think we care about kmalloc from a performance angle. Sure, it's
nice if we can make IPI's be really low cost, and we should aim for that,
but the reason the kmalloc() was added was never performance - nor is that
the reason we now try to remove it.

The kmalloc() was added for correctness reasons, and we now try to remove
it to make the code look saner and simpler (and hopefully it gets faster
too, but I don't think that was ever a primary issue), since we ended up
having _three_ different cases for the whole insane memory allocation
(on-stack, per-cpu and kmalloc), and nobody sane really wants that.

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