[PATCH] powerpc: Optimise per cpu accesses on 64bit

Alan Modra amodra at gmail.com
Wed Jun 2 08:40:26 EST 2010


On Tue, Jun 01, 2010 at 05:05:20PM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2010-06-01 at 14:45 +1000, Anton Blanchard wrote:
> > Now we dynamically allocate the paca array, it takes an extra load
> > whenever we want to access another cpu's paca. One place we do that a lot
> > is per cpu variables. A simple example:
> 
> Can't we dedicate a GPR instead ? Or it isn't worth it ? Something we
> almost never use in the kernel like r12 ?

Not r12.  It is used in function prologue and epilogue code.  If you
want a dedicated gpr I think you'll need to use (and lose) one of the
non-volatile regs.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Linuxppc-dev mailing list