mbox series

[RFC,0/4] Send RPC-on-TCP with one sock_sendmsg() call

Message ID 168893265677.1949.1632048925203798962.stgit@manet.1015granger.net (mailing list archive)
Headers show
Series Send RPC-on-TCP with one sock_sendmsg() call | expand

Message

Chuck Lever July 9, 2023, 8:04 p.m. UTC
After some discussion with David Howells at LSF/MM 2023, we arrived
at a plan to use a single sock_sendmsg() call for transmitting an
RPC message on socket-based transports. This is an initial part of
the transition to support handling folios with file content, but it
has scalability benefits as well.

Comments, suggestions, and test results are welcome.

---

Chuck Lever (4):
      SUNRPC: Convert svc_tcp_sendmsg to use bio_vecs directly
      SUNRPC: Convert svc_udp_sendto() to use the per-socket bio_vec array
      SUNRPC: Use a per-transport receive bio_vec array
      SUNRPC: Send RPC message on TCP with a single sock_sendmsg() call


 include/linux/sunrpc/svc.h     |   1 -
 include/linux/sunrpc/svcsock.h |   7 ++
 net/sunrpc/svcsock.c           | 142 ++++++++++++++++++---------------
 3 files changed, 86 insertions(+), 64 deletions(-)

--
Chuck Lever

Comments

Jeff Layton July 14, 2023, 1:26 p.m. UTC | #1
On Sun, 2023-07-09 at 16:04 -0400, Chuck Lever wrote:
> After some discussion with David Howells at LSF/MM 2023, we arrived
> at a plan to use a single sock_sendmsg() call for transmitting an
> RPC message on socket-based transports. This is an initial part of
> the transition to support handling folios with file content, but it
> has scalability benefits as well.
> 
> Comments, suggestions, and test results are welcome.
> 
> ---
> 
> Chuck Lever (4):
>       SUNRPC: Convert svc_tcp_sendmsg to use bio_vecs directly
>       SUNRPC: Convert svc_udp_sendto() to use the per-socket bio_vec array
>       SUNRPC: Use a per-transport receive bio_vec array
>       SUNRPC: Send RPC message on TCP with a single sock_sendmsg() call
> 
> 
>  include/linux/sunrpc/svc.h     |   1 -
>  include/linux/sunrpc/svcsock.h |   7 ++
>  net/sunrpc/svcsock.c           | 142 ++++++++++++++++++---------------
>  3 files changed, 86 insertions(+), 64 deletions(-)
> 
> --
> Chuck Lever
> 

Aside from my concerns with bounds checking on the first patch, this
looks like a good set of changes overall. Does it show any performance
improvements in your testing?
Chuck Lever July 14, 2023, 1:44 p.m. UTC | #2
> On Jul 14, 2023, at 9:26 AM, Jeff Layton <jlayton@kernel.org> wrote:
> 
> On Sun, 2023-07-09 at 16:04 -0400, Chuck Lever wrote:
>> After some discussion with David Howells at LSF/MM 2023, we arrived
>> at a plan to use a single sock_sendmsg() call for transmitting an
>> RPC message on socket-based transports. This is an initial part of
>> the transition to support handling folios with file content, but it
>> has scalability benefits as well.
>> 
>> Comments, suggestions, and test results are welcome.
>> 
>> ---
>> 
>> Chuck Lever (4):
>>      SUNRPC: Convert svc_tcp_sendmsg to use bio_vecs directly
>>      SUNRPC: Convert svc_udp_sendto() to use the per-socket bio_vec array
>>      SUNRPC: Use a per-transport receive bio_vec array
>>      SUNRPC: Send RPC message on TCP with a single sock_sendmsg() call
>> 
>> 
>> include/linux/sunrpc/svc.h     |   1 -
>> include/linux/sunrpc/svcsock.h |   7 ++
>> net/sunrpc/svcsock.c           | 142 ++++++++++++++++++---------------
>> 3 files changed, 86 insertions(+), 64 deletions(-)
>> 
>> --
>> Chuck Lever
>> 
> 
> Aside from my concerns with bounds checking on the first patch, this
> looks like a good set of changes overall. Does it show any performance
> improvements in your testing?

At the moment I'm mostly interested in not causing behavior regressions.

I plan to look at instruction path length and such once we've agreed
on the form of this change. With TCP, there are enough bottlenecks
that this kind of modification won't translate into much of a
performance delta observed at the client, but it might improve
scalability on the server.

When it's available in a git repo, I can ask Daire to try it out too.


--
Chuck Lever