Re: [patch] tlb flush_data: replace per_cpu with an array

From: Ingo Molnar
Date: Mon Jan 12 2009 - 17:55:45 EST



* Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:

> > It is also slower (or so percpu.h says), and confusing I'd say.
>
> Well it's something like 3 instructions versus one. [...]

That's enough - micro-optimizations are done like that, instruction by
instruction.

> [...] You would have a hard time benchmarking it unless you run it in a
> very tight loop. It will be lost in the noise compared to all the other
> costs of the IPI.
>
> Also why i don't like this patch is that on the typical small
> single/dual core system running a 128 byte cache line distro kernel you
> always pay the 1K cost now, while with per cpu it only needed one/two
> entries.

4 or 8 cores is the norm these days - by the time this change hits real
Linux computers en masse 8 cores will be quite common.

> Admittedly it could have been better commented.
>
> Not that it matters now unfortunately it's already applied. Sometimes
> wonder why I still bother to do patch review...

Whether patches are already applied or not has no relevance - patches can
still be undone or reverted of course, should your review feedback be
correct.

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/