usercopy in PPC64

Christophe LEROY christophe.leroy at c-s.fr
Wed May 31 16:55:30 AEST 2017


Le 30/05/2017 à 14:36, Christophe LEROY a écrit :
> Hi all powerpc64 experts,
> 
> While looking at the usercopy efficiency for PPC32, I noticed something 
> which looks strange.
> 
> In asm/uaccess.h, raw_copy_from_user() and raw_copy_to_user() implements 
> a fast path using get_user() and put_user() for copies of constant size 
> < 8.
> 
> But INLINE_COPY_FROM_USER and INLINE_COPY_TO_USER are only defined for 
> PPC32, so PPC64 will call __copy_tofrom_user() even for small constant 
> size copies. Is that wanted ?
> 

I tried and built ppc64_defconfig with and without INLINE_COPY_xxx_USER, 
I got the following result:

Without INLINE_COPY_xxx_USER:
System.map:c0000000009b2000 A _etext

With INLINE_COPY_xxx_USER:
System.map:c0000000009c1000 A _etext

So the size increase with inlining is only 0,6%
Wouldn't it be worth it ?

Christophe


More information about the Linuxppc-dev mailing list