usercopy in PPC64

2 messages, 1 author, 2017-05-31 · open the first message on its own page

usercopy in PPC64

From: Christophe LEROY <hidden>
Date: 2017-05-30 12:36:56

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 ?

Regards
Christophe

Re: usercopy in PPC64

From: Christophe LEROY <hidden>
Date: 2017-05-31 06:55:49

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help