From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Haris Iqbal <haris.iqbal@ionos.com>
Cc: jinpu.wang@ionos.com, jgg@ziepe.ca, leon@kernel.org,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH RFC 03/12] RDMA/rtrs-srv: Only close srv_path if it is just allocated
Date: Tue, 15 Nov 2022 18:24:39 +0800 [thread overview]
Message-ID: <0cea8072-ea26-9031-6f74-8707125e7d15@linux.dev> (raw)
In-Reply-To: <CAJpMwyhFo2PFMqtz1_BBdNDWyaYYPOMFj7kE0p=16uUQsvmUew@mail.gmail.com>
On 11/15/22 12:18 AM, Haris Iqbal wrote:
> On Sun, Nov 13, 2022 at 2:08 AM Guoqing Jiang<guoqing.jiang@linux.dev> wrote:
>> RTRS creates several connections per nr_cpu_ids, it makes more sense
>> to only close the path when it just allocated.
>>
>> Signed-off-by: Guoqing Jiang<guoqing.jiang@linux.dev>
>> ---
>> drivers/infiniband/ulp/rtrs/rtrs-srv.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
>> index 2cc8b423bcaa..063082d29fc6 100644
>> --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c
>> +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
>> @@ -1833,6 +1833,7 @@ static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
>> u16 version, con_num, cid;
>> u16 recon_cnt;
>> int err = -ECONNRESET;
>> + bool alloc_path = false;
>>
>> if (len < sizeof(*msg)) {
>> pr_err("Invalid RTRS connection request\n");
>> @@ -1906,6 +1907,7 @@ static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
>> pr_err("RTRS server session allocation failed: %d\n", err);
>> goto reject_w_err;
>> }
>> + alloc_path = true;
>> }
>> err = create_con(srv_path, cm_id, cid);
>> if (err) {
>> @@ -1940,7 +1942,8 @@ static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
>>
>> close_and_return_err:
>> mutex_unlock(&srv->paths_mutex);
>> - close_path(srv_path);
>> + if (alloc_path)
>> + close_path(srv_path);
> I think the way this is coded is, if there is a problem opening a
> connection in that srv_path, then it closes that srv_path gracefully,
> which results in all other connections in that path getting closed,
> and the IOs being failover'ed to the other path (in case of
> multipath), and then the client would trigger an auto reconnect.
Could it possible that IO is happening in the previous connection, then
a later
failed connection try to close all the connections.
> @Jinpu can shed some more light, what would be the preferred course of
> action if there is a failure in one connection. To keep the current
> design or to avoid closing the path in case of a connection issue.
Frankly, I am less confident about this patch and seems it is a rare
condition.
Will just drop it for now.
Thanks,
Guoqing
next prev parent reply other threads:[~2022-11-15 10:24 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 1:08 [PATCH RFC 00/12] Misc changes for rtrs Guoqing Jiang
2022-11-13 1:08 ` [PATCH RFC 01/12] RDMA/rtrs-srv: Remove ib_dev_count from rtrs_srv_ib_ctx Guoqing Jiang
2022-11-14 7:39 ` Jinpu Wang
2022-11-14 8:00 ` Guoqing Jiang
2022-11-14 8:24 ` Jinpu Wang
2022-11-14 8:45 ` Guoqing Jiang
2022-11-14 13:36 ` Haris Iqbal
2022-11-15 10:22 ` Guoqing Jiang
2022-11-13 1:08 ` [PATCH RFC 02/12] RDMA/rtrs-srv: Refactor rtrs_srv_rdma_cm_handler Guoqing Jiang
2022-11-14 14:39 ` Haris Iqbal
2022-11-15 10:24 ` Guoqing Jiang
2022-11-13 1:08 ` [PATCH RFC 03/12] RDMA/rtrs-srv: Only close srv_path if it is just allocated Guoqing Jiang
2022-11-14 16:18 ` Haris Iqbal
2022-11-15 10:24 ` Guoqing Jiang [this message]
2022-11-15 10:31 ` Jinpu Wang
2022-11-13 1:08 ` [PATCH RFC 04/12] RDMA/rtrs-srv: refactor the handling of failure case in map_cont_bufs Guoqing Jiang
2022-11-14 16:21 ` Haris Iqbal
2022-11-13 1:08 ` [PATCH RFC 05/12] RDMA/rtrs-srv: Correct the checking of ib_map_mr_sg Guoqing Jiang
2022-11-15 11:46 ` Jinpu Wang
2022-11-16 1:13 ` Guoqing Jiang
2022-11-16 5:44 ` Jinpu Wang
2022-11-13 1:08 ` [PATCH RFC 06/12] RDMA/rtrs-clt: " Guoqing Jiang
2022-11-15 11:49 ` Jinpu Wang
2022-11-13 1:08 ` [PATCH RFC 07/12] RDMA/rtrs-srv: Remove outdated comments from create_con Guoqing Jiang
2022-11-14 16:22 ` Haris Iqbal
2022-11-13 1:08 ` [PATCH RFC 08/12] RDMA/rtrs: Kill recon_cnt from several structs Guoqing Jiang
2022-11-15 9:39 ` Haris Iqbal
2022-11-15 9:53 ` Jinpu Wang
2022-11-15 9:58 ` Jinpu Wang
2022-11-15 10:33 ` Guoqing Jiang
2022-11-13 1:08 ` [PATCH RFC 09/12] RDMA/rtrs: Clean up rtrs_rdma_dev_pd_ops Guoqing Jiang
2022-11-15 9:18 ` Haris Iqbal
2022-11-13 1:08 ` [PATCH RFC 10/12] RDMA/rtrs-srv: Remove paths_num Guoqing Jiang
2022-11-15 9:48 ` Haris Iqbal
2022-11-15 10:01 ` Jinpu Wang
2022-11-15 10:30 ` Guoqing Jiang
2022-11-13 1:08 ` [PATCH RFC 11/12] RDMA/rtrs-srv: fix several issues in rtrs_srv_destroy_path_files Guoqing Jiang
2022-11-14 16:22 ` Haris Iqbal
2022-11-13 1:08 ` [PATCH RFC 12/12] RDMA/rtrs-srv: Remove kobject_del from rtrs_srv_destroy_once_sysfs_root_folders Guoqing Jiang
2022-11-14 16:23 ` Haris Iqbal
2022-11-14 8:32 ` [PATCH RFC 00/12] Misc changes for rtrs Leon Romanovsky
2022-11-14 8:46 ` Guoqing Jiang
2022-11-17 9:52 ` Leon Romanovsky
2022-11-17 10:06 ` Guoqing Jiang
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=0cea8072-ea26-9031-6f74-8707125e7d15@linux.dev \
--to=guoqing.jiang@linux.dev \
--cc=haris.iqbal@ionos.com \
--cc=jgg@ziepe.ca \
--cc=jinpu.wang@ionos.com \
--cc=leon@kernel.org \
--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.