From: Stefan Metzmacher <metze@samba.org>
To: Bernard Metzler <bmt@zurich.ibm.com>
Cc: Stefan Metzmacher <metze@samba.org>, linux-rdma@vger.kernel.org
Subject: [PATCH 0/7] rdma/siw: implement non-blocking connect
Date: Wed, 15 Jun 2022 10:40:00 +0200 [thread overview]
Message-ID: <cover.1655248086.git.metze@samba.org> (raw)
Hi Bernard,
as written a few month ago, I have a patchset with a lot
of fixes for siw.ko.
As requested I'm only send isolated chunks for easier review.
This is the first chunk adressing deadlocks in siw_connect()
The RDMA application layer expects rdma_connect() to be non-blocking
as the completion is handled via RDMA_CM_EVENT_ESTABLISHED and
other async events. It's not unlikely to hold a lock during
the rdma_connect() call.
Without out this a connection attempt to a non-existing/reachable
server block until the very long tcp timeout hits.
The application layer had no chance to have its own timeout handler
as that would just deadlock with the already blocking rdma_connect().
First rdma_connect() holds id_priv->handler_mutex and deadlocks
rdma_destroy_id().
And iw_cm_connect() called from within rdma_connect() sets
IWCM_F_CONNECT_WAIT during the call to cm_id->device->ops.iw_connect(),
siw_connect() in this case. It means that iw_cm_disconnect()
and iw_destroy_cm_id() will both deadlock waiting for
IWCM_F_CONNECT_WAIT being cleared.
Patches 1-6 are preparation patches to siw_connect()
in order to do the real non-blocking split in Patch 7.
Please have a look.
Thanks!
metze
Stefan Metzmacher (7):
rdma/siw: make use of kernel_{bind,connect,listen}()
rdma/siw: let siw_connect() set AWAIT_MPAREP before
siw_send_mpareqrep()
rdma/siw: create a temporary copy of private data
rdma/siw: use error and out logic at the end of siw_connect()
rdma/siw: start mpa timer before calling siw_send_mpareqrep()
rdma/siw: call the blocking kernel_bindconnect() just before
siw_send_mpareqrep()
rdma/siw: implement non-blocking connect.
drivers/infiniband/sw/siw/siw_cm.c | 165 ++++++++++++++++++++++-------
drivers/infiniband/sw/siw/siw_cm.h | 1 +
2 files changed, 127 insertions(+), 39 deletions(-)
--
2.34.1
next reply other threads:[~2022-06-15 8:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 8:40 Stefan Metzmacher [this message]
2022-06-15 8:40 ` [PATCH 1/7] rdma/siw: make use of kernel_{bind,connect,listen}() Stefan Metzmacher
2022-06-15 8:40 ` [PATCH 2/7] rdma/siw: let siw_connect() set AWAIT_MPAREP before siw_send_mpareqrep() Stefan Metzmacher
2022-06-15 8:40 ` [PATCH 3/7] rdma/siw: create a temporary copy of private data Stefan Metzmacher
2022-06-15 8:40 ` [PATCH 4/7] rdma/siw: use error and out logic at the end of siw_connect() Stefan Metzmacher
2022-06-15 8:40 ` [PATCH 5/7] rdma/siw: start mpa timer before calling siw_send_mpareqrep() Stefan Metzmacher
2022-06-15 10:08 ` Cheng Xu
2022-06-15 10:34 ` Stefan Metzmacher
2022-06-15 8:40 ` [PATCH 6/7] rdma/siw: call the blocking kernel_bindconnect() just before siw_send_mpareqrep() Stefan Metzmacher
2022-06-15 8:40 ` [PATCH 7/7] rdma/siw: implement non-blocking connect Stefan Metzmacher
2022-06-15 9:56 ` Cheng Xu
2022-06-15 10:14 ` Cheng Xu
2022-06-15 15:26 ` [PATCH v2 00/14] " Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 01/14] rdma/siw: remove superfluous siw_cep_put() from siw_connect() error path Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 02/14] rdma/siw: make siw_cm_upcall() a noop without valid 'id' Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 03/14] rdma/siw: split out a __siw_cep_terminate_upcall() function Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 04/14] rdma/siw: use __siw_cep_terminate_upcall() for indirect SIW_CM_WORK_CLOSE_LLP Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 05/14] rdma/siw: use __siw_cep_terminate_upcall() for SIW_CM_WORK_PEER_CLOSE Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 06/14] rdma/siw: use __siw_cep_terminate_upcall() for SIW_CM_WORK_MPATIMEOUT Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 07/14] rdma/siw: handle SIW_EPSTATE_CONNECTING in __siw_cep_terminate_upcall() Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 08/14] rdma/siw: make use of kernel_{bind,connect,listen}() Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 09/14] rdma/siw: let siw_connect() set AWAIT_MPAREP before siw_send_mpareqrep() Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 10/14] rdma/siw: create a temporary copy of private data Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 11/14] rdma/siw: use error and out logic at the end of siw_connect() Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 12/14] rdma/siw: start mpa timer before calling siw_send_mpareqrep() Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 13/14] rdma/siw: call the blocking kernel_bindconnect() just before siw_send_mpareqrep() Stefan Metzmacher
2022-06-15 15:26 ` [PATCH v2 14/14] rdma/siw: implement non-blocking connect Stefan Metzmacher
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.1655248086.git.metze@samba.org \
--to=metze@samba.org \
--cc=bmt@zurich.ibm.com \
--cc=linux-rdma@vger.kernel.org \
/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.