From: Santosh Shilimkar <santosh.shilimkar@oracle.com>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: netdev@vger.kernel.org, willemdebruijn.kernel@gmail.com,
davem@davemloft.net, Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH V3 net-next 2/3] rds: deliver zerocopy completion notification with data
Date: Mon, 26 Feb 2018 09:07:41 -0800 [thread overview]
Message-ID: <950eb12c-0520-3656-6667-c13148cec326@oracle.com> (raw)
In-Reply-To: <23e6f429241f589c5371fa6b5a22cbe1628c7d2b.1519600399.git.sowmini.varadhan@oracle.com>
On 2/25/2018 3:21 PM, Sowmini Varadhan wrote:
> This commit is an optimization over commit 01883eda72bd
> ("rds: support for zcopy completion notification") for PF_RDS sockets.
>
> RDS applications are predominantly request-response transactions, so
> it is more efficient to reduce the number of system calls and have
> zerocopy completion notification delivered as ancillary data on the
> POLLIN channel.
>
> Cookies are passed up as ancillary data (at level SOL_RDS) in a
> struct rds_zcopy_cookies when the returned value of recvmsg() is
> greater than, or equal to, 0. A max of RDS_MAX_ZCOOKIES may be passed
> with each message.
>
> This commit removes support for zerocopy completion notification on
> MSG_ERRQUEUE for PF_RDS sockets.
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
> v2: remove sk_error_queue path; lot of cautionary checks rds_recvmsg_zcookie()
> and callers to make sure we dont remove cookies from the queue and then
> fail to pass it up to caller
> v3:
> - bounds check on skb->cb to make sure there is enough room for
> struct rds_zcopy_cookies as well as the rds_znotifier;
> - Refactor cautionary checks in rds_recvmsg_zcookie: if no msg_control
> has been passed, or if there not enough msg_controllen for a
> a rds_zcopy_cookies, return silently (do not return error, as the
> caller may have wanted other ancillary data which may happen to fit
> in the space provided)
> - return bool form rds_recvmsg_zcookie, some other code cleanup
>
Just in case you haven't seen yet, Dan Carpenter reported skb deref
warning on previous version of the patch. Not sure why it wasn't sent
on netdev.
smatch warnings:
net/rds/recv.c:605 rds_recvmsg_zcookie() warn: variable dereferenced
before check 'skb' (see line 596)
With that addressed,
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
next prev parent reply other threads:[~2018-02-26 17:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 17:08 [PATCH RESEND V3 net-next 0/3] RDS: optimized notification for zerocopy completion Sowmini Varadhan
2018-02-26 16:56 ` [PATCH " Willem de Bruijn
2018-02-27 17:08 ` [PATCH RESEND V3 net-next 1/3] selftests/net: revert the zerocopy Rx path for PF_RDS Sowmini Varadhan
2018-02-27 17:08 ` [PATCH RESEND V3 net-next 2/3] rds: deliver zerocopy completion notification with data Sowmini Varadhan
2018-02-26 17:07 ` Santosh Shilimkar [this message]
2018-02-26 17:11 ` [PATCH " Sowmini Varadhan
2018-02-26 17:13 ` David Miller
2018-02-26 17:15 ` Santosh Shilimkar
2018-02-27 17:08 ` [PATCH RESEND V3 net-next 3/3] selftests/net: reap zerocopy completions passed up as ancillary data Sowmini Varadhan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=950eb12c-0520-3656-6667-c13148cec326@oracle.com \
--to=santosh.shilimkar@oracle.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sowmini.varadhan@oracle.com \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).