[PATCH] powerpc: POWER7 optimised copy_to_user/copy_from_user using VMX

David Laight David.Laight at ACULAB.COM
Fri Dec 9 01:02:39 EST 2011


 
> > One idea would be to have a structure of function pointers for each
> > CPU that gets runtime patched into the right places, 
> > similar to how we do some of the MMU fixups.
> 
> Sounds good to me :-)

Except the indirect jump/call is almost certainly
never predicted - so will be slow.

You might want to patch jump instructions instead.

The same is true for in-kernel memcpy() and other
similar operations.

I actually wonder sometimes what the typical lengths
are for these sort of functions, and whether, in fact,
small lengths dominate - where the fixed costs matter.

	David




More information about the Linuxppc-dev mailing list