From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, rds-devel@oss.oracle.com,
sowmini.varadhan@oracle.com, santosh.shilimkar@oracle.com
Subject: [PATCH net-next 0/2] rds: use RCU between work-enqueue and connection teardown
Date: Thu, 4 Jan 2018 06:52:58 -0800 [thread overview]
Message-ID: <cover.1515068006.git.sowmini.varadhan@oracle.com> (raw)
This patchset follows up on the root-cause mentioned in
https://www.spinics.net/lists/netdev/msg472849.html
Patch1 implements some code refactoring that was suggeseted
as an enhancement in http://patchwork.ozlabs.org/patch/843157/
It replaces the c_destroy_in_prog bit in rds_connection with
an atomically managed flag in rds_conn_path.
Patch2 builds on Patch1 and uses RCU to make sure that
work is only enqueued if the connection destroy is not already
in progress: the test-flag-and-enqueue is done under rcu_read_lock,
while destroy first sets the flag, uses synchronize_rcu to
wait for existing reader threads to complete, and then starts
all the work-cancellation.
Since I have not been able to reproduce the original stack traces
reported by syszbot, and these are fixes for a race condition that
are based on code-inspection I am not marking these as reported-by
at this time.
Sowmini Varadhan (2):
rds: Use atomic flag to track connections being destroyed
rds: Ensure that send/recv/reconnect work cannot be requeued from
softirq or proc context
net/rds/cong.c | 10 +++++++---
net/rds/connection.c | 24 +++++++++++++++++++-----
net/rds/rds.h | 4 ++--
net/rds/send.c | 37 ++++++++++++++++++++++++++++++++-----
net/rds/tcp_connect.c | 2 +-
net/rds/tcp_recv.c | 8 ++++++--
net/rds/tcp_send.c | 5 ++++-
net/rds/threads.c | 20 +++++++++++++++-----
8 files changed, 86 insertions(+), 24 deletions(-)
next reply other threads:[~2018-01-04 15:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-04 14:52 Sowmini Varadhan [this message]
2018-01-04 14:52 ` [PATCH net-next 1/2] rds: Use atomic flag to track connections being destroyed Sowmini Varadhan
2018-01-04 14:53 ` [PATCH net-next 2/2] rds: use RCU to synchronize work-enqueue with connection teardown Sowmini Varadhan
2018-01-05 18:39 ` [PATCH net-next 0/2] rds: use RCU between work-enqueue and " 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=cover.1515068006.git.sowmini.varadhan@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=santosh.shilimkar@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.