Commit 31303d6c authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Use MSG_SENDPAGE_NOTLAST in xs_send_pagedata()

If we're sending more than one page via kernel_sendpage(), then set
MSG_SENDPAGE_NOTLAST between the pages so that we don't send suboptimal
frames (see commit 2f533844 and commit 35f9c09f).
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent a2648094
...@@ -360,8 +360,10 @@ static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned i ...@@ -360,8 +360,10 @@ static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned i
int flags = XS_SENDMSG_FLAGS; int flags = XS_SENDMSG_FLAGS;
remainder -= len; remainder -= len;
if (remainder != 0 || more) if (more)
flags |= MSG_MORE; flags |= MSG_MORE;
if (remainder != 0)
flags |= MSG_SENDPAGE_NOTLAST | MSG_MORE;
err = do_sendpage(sock, *ppage, base, len, flags); err = do_sendpage(sock, *ppage, base, len, flags);
if (remainder == 0 || err != len) if (remainder == 0 || err != len)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment