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 v3 net-next 2/7] rds: hold a sock ref from rds_message to the rds_sock
Date: Thu, 15 Feb 2018 11:45:43 -0800	[thread overview]
Message-ID: <a5a6eb8c-a24d-fd05-03ca-acf6d72b8ba1@oracle.com> (raw)
In-Reply-To: <aef92756fc77c5dcc22a6fbd0c130c5fd4b11b15.1518718761.git.sowmini.varadhan@oracle.com>

On 2/15/2018 10:49 AM, Sowmini Varadhan wrote:
> The existing model holds a reference from the rds_sock to the
> rds_message, but the rds_message does not itself hold a sock_put()
> on the rds_sock. Instead the m_rs field in the rds_message is
> assigned when the message is queued on the sock, and nulled when
> the message is dequeued from the sock.
> 
> We want to be able to notify userspace when the rds_message
> is actually freed (from rds_message_purge(), after the refcounts
> to the rds_message go to 0). At the time that rds_message_purge()
> is called, the message is no longer on the rds_sock retransmit
> queue. Thus the explicit reference for the m_rs is needed to
> send a notification that will signal to userspace that
> it is now safe to free/reuse any pages that may have
> been pinned down for zerocopy.
> 
> This patch manages the m_rs assignment in the rds_message with
> the necessary refcount book-keeping.
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

  reply	other threads:[~2018-02-15 19:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 18:49 [PATCH v3 net-next 0/7] RDS: zerocopy support Sowmini Varadhan
2018-02-15 18:49 ` [PATCH v3 net-next 1/7] skbuff: export mm_[un]account_pinned_pages for other modules Sowmini Varadhan
2018-02-15 20:41   ` Willem de Bruijn
2018-02-15 18:49 ` [PATCH v3 net-next 2/7] rds: hold a sock ref from rds_message to the rds_sock Sowmini Varadhan
2018-02-15 19:45   ` Santosh Shilimkar [this message]
2018-02-15 18:49 ` [PATCH v3 net-next 3/7] sock: permit SO_ZEROCOPY on PF_RDS socket Sowmini Varadhan
2018-02-15 20:41   ` Willem de Bruijn
2018-02-15 18:49 ` [PATCH v3 net-next 4/7] rds: support for zcopy completion notification Sowmini Varadhan
2018-02-15 19:46   ` Santosh Shilimkar
2018-02-15 20:42     ` Willem de Bruijn
2018-02-15 18:49 ` [PATCH v3 net-next 5/7] rds: zerocopy Tx support Sowmini Varadhan
2018-02-15 19:47   ` Santosh Shilimkar
2018-02-15 20:42     ` Willem de Bruijn
2018-02-15 18:49 ` [PATCH v3 net-next 6/7] selftests/net: add support for PF_RDS sockets Sowmini Varadhan
2018-02-15 20:42   ` Willem de Bruijn
2018-02-15 18:49 ` [PATCH v3 net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case Sowmini Varadhan
2018-02-15 20:43   ` Willem de Bruijn
2018-02-16 21:13 ` [PATCH v3 net-next 0/7] RDS: zerocopy support David Miller

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=a5a6eb8c-a24d-fd05-03ca-acf6d72b8ba1@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).