Re: [PATCH net-next] scm: optimize put_cmsg()

2021-04-16 Thread Jakub Kicinski
On Fri, 16 Apr 2021 20:28:40 +0200 Eric Dumazet wrote: > On Fri, Apr 16, 2021 at 7:57 PM Jakub Kicinski wrote: > > > > On Thu, 15 Apr 2021 10:37:53 -0700 Eric Dumazet wrote: > > > From: Eric Dumazet > > > > > > Calling two copy_to_user() for very small regions has very high overhead. > > > > >

Re: [PATCH net-next] scm: optimize put_cmsg()

2021-04-16 Thread Jakub Kicinski
On Thu, 15 Apr 2021 10:37:53 -0700 Eric Dumazet wrote: > From: Eric Dumazet > > Calling two copy_to_user() for very small regions has very high overhead. > > Switch to inlined unsafe_put_user() to save one stac/clac sequence, > and avoid copy_to_user(). > > Signed-off-by: Eric Dumazet > Cc: So

[PATCH net-next] scm: optimize put_cmsg()

2021-04-15 Thread Eric Dumazet
From: Eric Dumazet Calling two copy_to_user() for very small regions has very high overhead. Switch to inlined unsafe_put_user() to save one stac/clac sequence, and avoid copy_to_user(). Signed-off-by: Eric Dumazet Cc: Soheil Hassas Yeganeh --- net/core/scm.c | 21 ++--- 1 fi