netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@oracle.com>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>,
	netdev@vger.kernel.org, willemdebruijn.kernel@gmail.com
Cc: davem@davemloft.net, rds-devel@oss.oracle.com
Subject: Re: [PATCH V2 net-next 4/7] rds: support for zcopy completion notification
Date: Wed, 14 Feb 2018 10:50:32 -0800	[thread overview]
Message-ID: <331448b2-65d1-0f62-033c-b97d87a57b87@oracle.com> (raw)
In-Reply-To: <f9cf8d59bed78822f177364eea8e3f55f197776b.1517843755.git.sowmini.varadhan@oracle.com>

On 2/14/2018 2:28 AM, Sowmini Varadhan wrote:
> RDS removes a datagram (rds_message) from the retransmit queue when
> an ACK is received. The ACK indicates that the receiver has queued
> the RDS datagram, so that the sender can safely forget the datagram.
> When all references to the rds_message are quiesced, rds_message_purge
> is called to release resources used by the rds_message
> 
> If the datagram to be removed had pinned pages set up, add
> an entry to the rs->rs_znotify_queue so that the notifcation
> will be sent up via rds_rm_zerocopy_callback() when the
> rds_message is eventually freed by rds_message_purge.
> 
> rds_rm_zerocopy_callback() attempts to batch the number of cookies
> sent with each notification  to a max of SO_EE_ORIGIN_MAX_ZCOOKIES.
> This is achieved by checking the tail skb in the sk_error_queue:
> if this has room for one more cookie, the cookie from the
> current notification is added; else a new skb is added to the
> sk_error_queue. Every invocation of rds_rm_zerocopy_callback() will
> trigger a ->sk_error_report to notify the application.
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
> v2:
>    - make sure to always sock_put m_rs even if there is no znotifier.
>    - major rewrite of notification, resulting in much simplification.
>
>   include/uapi/linux/errqueue.h |    2 +
>   net/rds/af_rds.c              |    2 +
>   net/rds/message.c             |   83 +++++++++++++++++++++++++++++++++++++---
>   net/rds/rds.h                 |   14 +++++++
>   net/rds/recv.c                |    2 +
>   5 files changed, 96 insertions(+), 7 deletions(-)
>
generic comment and please update it where it is applicable
in terms of variable names, notifiers etc.

RDS support true zero copy already with RDMA transport so some of
this code can easily get confused.

So I suggest something like below.
s/zerocopy/zeromsgcopy
s/zcopy/zmsgcopy
s/zcookie/zmsgcpycookie
s/znotifier/zmsgcpynotifier	


> diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h
> index dc64cfa..28812ed 100644
> --- a/include/uapi/linux/errqueue.h
> +++ b/include/uapi/linux/errqueue.h
> @@ -20,11 +20,13 @@ struct sock_extended_err {
>   #define SO_EE_ORIGIN_ICMP6	3
>   #define SO_EE_ORIGIN_TXSTATUS	4
>   #define SO_EE_ORIGIN_ZEROCOPY	5
> +#define SO_EE_ORIGIN_ZCOOKIE	6
>   #define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS
>   
>   #define SO_EE_OFFENDER(ee)	((struct sockaddr*)((ee)+1))
>   
>   #define SO_EE_CODE_ZEROCOPY_COPIED	1
> +#define	SO_EE_ORIGIN_MAX_ZCOOKIES	8

This error change might need to go though other subsystem tree. May
be you can seperate it and also copy "linux-api@vger.kernel.org"

Otherwise changes looks fine to me.

Regards,
Santosh

  reply	other threads:[~2018-02-14 18:50 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 10:28 [PATCH V2 net-next 0/7] RDS: zerocopy support Sowmini Varadhan
2018-02-14 10:28 ` [PATCH V2 net-next 1/7] skbuff: export mm_[un]account_pinned_pages for other modules Sowmini Varadhan
2018-02-14 10:28 ` [PATCH V2 net-next 2/7] rds: hold a sock ref from rds_message to the rds_sock Sowmini Varadhan
2018-02-14 18:38   ` Santosh Shilimkar
2018-02-14 10:28 ` [PATCH V2 net-next 3/7] sock: permit SO_ZEROCOPY on PF_RDS socket Sowmini Varadhan
2018-02-14 10:28 ` [PATCH V2 net-next 4/7] rds: support for zcopy completion notification Sowmini Varadhan
2018-02-14 18:50   ` Santosh Shilimkar [this message]
2018-02-14 19:01     ` Sowmini Varadhan
2018-02-14 19:02       ` David Miller
2018-02-14 21:10         ` Santosh Shilimkar
2018-02-14 21:25           ` Sowmini Varadhan
2018-02-14 21:39             ` Santosh Shilimkar
2018-02-14 22:08             ` Santosh Shilimkar
2018-02-14 19:17       ` Santosh Shilimkar
2018-02-14 22:26     ` Willem de Bruijn
2018-02-15  0:19       ` Santosh Shilimkar
2018-02-15  0:12   ` Willem de Bruijn
2018-02-15  0:41   ` Willem de Bruijn
2018-02-15 12:03     ` Sowmini Varadhan
2018-02-15 16:35       ` Willem de Bruijn
2018-02-15 16:43         ` Sowmini Varadhan
2018-02-14 10:28 ` [PATCH V2 net-next 5/7] rds: zerocopy Tx support Sowmini Varadhan
2018-02-14 19:10   ` Santosh Shilimkar
2018-02-14 19:49     ` Sowmini Varadhan
2018-02-14 21:14       ` Santosh Shilimkar
2018-02-14 23:48   ` Willem de Bruijn
2018-02-15  0:09     ` Sowmini Varadhan
2018-02-15  0:15       ` Willem de Bruijn
2018-02-14 10:28 ` [PATCH V2 net-next 6/7] selftests/net: add support for PF_RDS sockets Sowmini Varadhan
2018-02-14 10:28 ` [PATCH V2 net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case Sowmini Varadhan
2018-02-15  0:19 ` [PATCH V2 net-next 0/7] RDS: zerocopy support Willem de Bruijn

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=331448b2-65d1-0f62-033c-b97d87a57b87@oracle.com \
    --to=santosh.shilimkar@oracle.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --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).