From: Alexandra Winter <wintera@linux.ibm.com>
To: "D. Wythe" <alibuda@linux.alibaba.com>,
kgraul@linux.ibm.com, wenjia@linux.ibm.com, jaka@linux.ibm.com
Cc: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [RFC net-next 0/2] Optimize the parallelism of SMC-R connections
Date: Fri, 8 Sep 2023 11:07:36 +0200 [thread overview]
Message-ID: <794f9f68-4671-5e5e-45e4-2c8a4de568b3@linux.ibm.com> (raw)
In-Reply-To: <1694008530-85087-1-git-send-email-alibuda@linux.alibaba.com>
On 06.09.23 15:55, D. Wythe wrote:
> From: "D. Wythe" <alibuda@linux.alibaba.com>
>
> This patchset attempts to optimize the parallelism of SMC-R connections
> in quite a SIMPLE way, reduce unnecessary blocking on locks.
>
> According to Off-CPU statistics, SMC worker's off-CPU statistics
> as that:
>
> smc_listen_work (48.17%)
> __mutex_lock.isra.11 (47.96%)
>
> An ideal SMC-R connection process should only block on the IO events
> of the network, but it's quite clear that the SMC-R connection now is
> queued on the lock most of the time.
>
> Before creating a connection, we always try to see if it can be
> successfully created without allowing the creation of an lgr,
> if so, it means it does not rely on new link group.
> In other words, locking on xxx_lgr_pending is not necessary
> any more.
>
> Noted that removing this lock will not have an immediate effect
> in the current version, as there are still some concurrency issues
> in the SMC handshake phase. However, regardless, removing this lock
> is a prerequisite for other optimizations.
>
> If you have any questions or suggestions, please let me know.
>
> D. Wythe (2):
> net/smc: refactoring lgr pending lock
> net/smc: remove locks smc_client_lgr_pending and
> smc_server_lgr_pending
>
> net/smc/af_smc.c | 24 ++++++++++++------------
> net/smc/smc_clc.h | 1 +
> net/smc/smc_core.c | 28 ++++++++++++++++++++++++++--
> net/smc/smc_core.h | 21 +++++++++++++++++++++
> 4 files changed, 60 insertions(+), 14 deletions(-)
>
I have to admit that locking in SMC is quite confusing to me, so this is just my thougths.
Your proposal seems to make things even more complex.
I understand the goal to optimize parallelism.
Today we have the global smc_server/client_lgr_pending AND smc_lgr_list.lock (and more).
There seems to be some overlpa in scope..
Maybe there is some way to reduce the length of the locked paths?
Or use other mechanisms than the big fat smc_server/client_lgr_pending mutex?
e.g.
If you think you can unlock after __smc_conn_create in the re-use-existing_LGR case,
why is the lock needed until after smc_clc_send_confirm in the new-LGR case??
Your use of storing the global lock per ini and then double-freeing it sometimes,
seems a bit homebrewed, though.
E.g. I'm afraid the existing lock checking algorithms could not verify this pattern.
next prev parent reply other threads:[~2023-09-08 9:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 13:55 [RFC net-next 0/2] Optimize the parallelism of SMC-R connections D. Wythe
2023-09-06 13:55 ` [RFC net-next 1/2] net/smc: refactoring lgr pending lock D. Wythe
2023-09-06 13:55 ` [RFC net-next 2/2] net/smc: remove locks smc_client_lgr_pending and smc_server_lgr_pending D. Wythe
2023-09-08 9:07 ` Alexandra Winter [this message]
[not found] ` <522d823c-b656-ffb5-bcce-65b96bdfa46d@linux.alibaba.com>
2023-09-21 12:36 ` [RFC net-next 0/2] Optimize the parallelism of SMC-R connections Alexandra Winter
2023-09-25 10:10 ` D. Wythe
2023-09-26 7:37 ` Alexandra Winter
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=794f9f68-4671-5e5e-45e4-2c8a4de568b3@linux.ibm.com \
--to=wintera@linux.ibm.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=jaka@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wenjia@linux.ibm.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).