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

Ingo Molnar
2009-01-12T22:55:43Z

* Andi Kleen <andi@firstfloor.org> 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