All of lore.kernel.org
 help / color / mirror / Atom feed
* usercopy in PPC64
@ 2017-05-30 12:36 Christophe LEROY
  2017-05-31  6:55 ` Christophe LEROY
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe LEROY @ 2017-05-30 12:36 UTC (permalink / raw)
  To: linuxppc-dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: usercopy in PPC64
  2017-05-30 12:36 usercopy in PPC64 Christophe LEROY
@ 2017-05-31  6:55 ` Christophe LEROY
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe LEROY @ 2017-05-31  6:55 UTC (permalink / raw)
  To: linuxppc-dev


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-31  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30 12:36 usercopy in PPC64 Christophe LEROY
2017-05-31  6:55 ` Christophe LEROY

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.