From: Alexandra Winter <wintera@linux.ibm.com>
To: Wen Gu <guwen@linux.alibaba.com>,
Jan Karcher <jaka@linux.ibm.com>,
dust.li@linux.alibaba.com, kgraul@linux.ibm.com,
wenjia@linux.ibm.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com
Cc: schnelle@linux.ibm.com, gbayer@linux.ibm.com,
pasic@linux.ibm.com, alibuda@linux.alibaba.com,
tonylu@linux.alibaba.com, linux-s390@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v4 09/18] net/smc: introduce SMC-D loopback device
Date: Fri, 29 Sep 2023 16:08:43 +0200 [thread overview]
Message-ID: <c2117ecb-466c-cc45-04c5-f12adedec217@linux.ibm.com> (raw)
In-Reply-To: <22858b56-dee0-e65f-a698-b0f2090a872d@linux.alibaba.com>
On 28.09.23 20:35, Wen Gu wrote:
>
>
> On 2023/9/28 11:16, Jan Karcher wrote:
>>
>>
>> On 26/09/2023 09:24, Alexandra Winter wrote:
>>>
>>>
>>> On 25.09.23 17:18, Dust Li wrote:
>>>>> Hello Wen Gu,
>>>>>
>>>>> thank you for adding the Kconfig, so the distributions can decide when to offer this feature.
>>>>>
>>>>> I propose you add some kind of runtime switch as well. Not every user who loads the SMC module
>>>>> may want to exploit smcd-loopback. Especially in native environements without containers.
>>>>>
>>>>> If no RoCE interfaces or no ISM interfaces exist, the respective handling is skipped in SMC.
>>>>> If loopback is always created unconditionally, there is no way to opt-out.
>>>> Hi Sandy,
>>>>
>>>> After talking to Wen Gu offline, I think the real issue here might be
>>>> we don't have an abstract layer in SMC, something like net/core/dev.c
>>>>
>>>> Without this, we cannot do:
>>>>
>>>> 1. Enable/disable those devices dynamically
>>>> Currently, If we want to disable a SMC-R device to communicate with
>>>> others, we need to refer to 'ip link set dev xxx down' to disable the
>>>> netdevice, then Infiniband subsystem will notify SMC that the state of
>>>> the IB device has changed. We cannot explicitly choose not to use some
>>>> specific IB/RoCE devices without disable totally.
>>>> If the loopback device need to support enable/disable itself, I
>>>> think it might be better to enable this feature for all SMC devices.
>>>>
>>>> 2. Do statistics per device
>>>> Now, we have to relay on IB/RoCE devices' hardware statistics to see
>>>> how many packets/bytes we have sent through this device.
>>>>
>>>> Both the above issues get worse when the IB/RoCE device is shared by SMC
>>>> and userspace RDMA applications. If SMC-R and userspace RDMA applications
>>>> run at the same time, we can't enable the device to run userspace RDMA
>>>> applications while block it from running SMC. For statistics, we cannot
>>>> tell how many packets/bytes were sent by SMC and how many were sent by
>>>> userspace RDMA applications.
>>>>
>>>> So I think those are better to support in the SMC layer.
>>>>
>>>> Best regards!
>>>> Dust
>>>
>>> Thank you very much for your considerations. I also think a generic handling
>>> of these requirements in the smc layer would be best. Especially, if we want
>>> to add virtio-ism support soon. There we will face the same issues again.
>>> Let's hear what others think about this.
>>>
>>>
>>
>> Thanks you Sandy for bringing it up and Dust Li & Wen Gu for your thoughts.
>> I agree that such a runtime switch is needed and also that this generic handling would be good in the smc layer.
>
> Right. runtime switch is necessary. I'm trying some ways to see which one is more suitable.
>
>
> As for implementing a abstract layer that capable of handling 1) enable/disable SMC usage of
> RDMA/ISM devices. 2) count packets/bytes of RDMA/ISM devices that generated/consumed by SMC,
> I believe it would be helpful, and IMHO its architecture may be:
>
> ----------------------------------------------
> SMC protocol
> (af_smc.c / smc_core.c / smc_clc.c ...)
> ----------------------------------------------
> Abstract layer of SMC device
> (define SMC device common operations)
> ----------------------------------------------
> RDMA device | (virt) ISM device
> (smc_ib.c) | (smc_ism.c / smc_loopback.c)
> ----------------------------------------------
>
> But I also believe this may require a lot of works and may be a long-term job.
>
I like that concept a lot. If we can agree on a direction, we can define
meaningful pieces and approach it piece by piece.
> If only for the virtual ISM device, e.g.loopback-ism, I am considering adding it to the Linux
> device tree (/sys/devices/virtual/) to make it more 'device-like', and controlling its
> enable/disable and get the statistics through some files, such as
> echo 1 > /sys/devices/virtual/loopback-ism/alive
> or
> cat /sys/devices/virtual/loopback-ism/statistics/{rx|tx}_{bytes|packets}
> (similar to what tcp lo have in /sys/devices/virtual/net/lo)
>
> What are your thoughts on it? Thanks.
>
Makes sense to me, but I don't have too much experience in that area.
I have never seen an attribute called 'alive' before.
I think attributes like 'power', 'enable' or 'online' are used for other device types.
>
> --
> A little off-topic, it's currently China's National Day holiday, which lasts for about a week,
> so we are now on vacation. As a result, my responses might be a bit slower, but I will still
> make time to check/reply the mail and prepare for my new version. Thank you all very much!
>
> Regards,
> Wen Gu
Next week is Germany's national holiday, so many of us are out as well.
next prev parent reply other threads:[~2023-09-29 14:09 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 15:16 [PATCH net-next v4 00/18] net/smc: implement virtual ISM extension and loopback-ism Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 01/18] net/smc: decouple ism_dev from SMC-D device dump Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 02/18] net/smc: decouple ism_dev from SMC-D DMB registration Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 03/18] net/smc: extract v2 check helper from SMC-D device registration Wen Gu
2023-09-28 3:08 ` Jan Karcher
2023-09-30 8:41 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 04/18] net/smc: support SMCv2.x supplemental features negotiation Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 05/18] net/smc: reserve CHID range for SMC-D virtual device Wen Gu
2023-09-28 3:08 ` Jan Karcher
2023-09-28 9:10 ` Alexandra Winter
2023-10-04 8:27 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 06/18] net/smc: extend GID to 128bits only for virtual ISM device Wen Gu
2023-10-12 7:54 ` Dust Li
2023-10-12 13:24 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 07/18] net/smc: disable SEID on non-s390 architecture Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 08/18] net/smc: enable virtual ISM device feature bit Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 09/18] net/smc: introduce SMC-D loopback device Wen Gu
2023-09-25 11:50 ` Alexandra Winter
2023-09-25 13:29 ` Alexandra Winter
2023-09-25 14:20 ` Wen Gu
2023-09-25 13:57 ` Wen Gu
2023-09-25 15:18 ` Dust Li
2023-09-26 7:24 ` Alexandra Winter
2023-09-28 3:16 ` Jan Karcher
2023-09-28 18:35 ` Wen Gu
2023-09-29 14:08 ` Alexandra Winter [this message]
2023-10-04 9:05 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 10/18] net/smc: implement ID-related operations of loopback Wen Gu
2023-10-18 13:24 ` Alexandra Winter
2023-09-24 15:16 ` [PATCH net-next v4 11/18] net/smc: implement some unsupported " Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 12/18] net/smc: implement DMB-related " Wen Gu
2023-09-24 23:29 ` kernel test robot
2023-09-25 1:47 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 13/18] net/smc: register loopback device as SMC-Dv2 device Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 14/18] net/smc: add operation for getting DMB attribute Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 15/18] net/smc: add operations for DMB attach and detach Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 16/18] net/smc: avoid data copy from sndbuf to peer RMB in SMC-D Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 17/18] net/smc: modify cursor update logic when sndbuf mapped to RMB Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 18/18] net/smc: add interface implementation of loopback device Wen Gu
2023-09-26 7:30 ` [PATCH net-next v4 00/18] net/smc: implement virtual ISM extension and loopback-ism Alexandra Winter
2023-09-27 15:16 ` Alexandra Winter
2023-09-28 8:56 ` Alexandra Winter
2023-09-28 17:29 ` Wen Gu
2023-09-29 13:31 ` Alexandra Winter
2023-10-04 8:42 ` Wen Gu
2023-09-28 16:42 ` Wen Gu
2023-10-05 8:21 ` Niklas Schnelle
2023-10-08 7:19 ` Wen Gu
2023-10-17 3:49 ` Wen Gu
2023-10-18 19:43 ` Wenjia Zhang
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=c2117ecb-466c-cc45-04c5-f12adedec217@linux.ibm.com \
--to=wintera@linux.ibm.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=gbayer@linux.ibm.com \
--cc=guwen@linux.alibaba.com \
--cc=jaka@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=schnelle@linux.ibm.com \
--cc=tonylu@linux.alibaba.com \
--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).