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


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to