From: Chuck Lever <chucklever@gmail.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Ka-Cheong Poon <ka-cheong.poon@oracle.com>,
Leon Romanovsky <leon@kernel.org>,
linux-rdma@vger.kernel.org
Subject: Re: RDMA subsystem namespace related questions (was Re: Finding the namespace of a struct ib_device)
Date: Fri, 9 Oct 2020 11:27:44 -0400 [thread overview]
Message-ID: <7EC25CA9-27B5-4900-B49C-43D29ED06EB6@gmail.com> (raw)
In-Reply-To: <20201009150758.GV5177@ziepe.ca>
> On Oct 9, 2020, at 11:07 AM, Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Fri, Oct 09, 2020 at 11:00:22AM -0400, Chuck Lever wrote:
>>
>>
>>> On Oct 9, 2020, at 10:57 AM, Jason Gunthorpe <jgg@ziepe.ca> wrote:
>>>
>>> On Fri, Oct 09, 2020 at 10:48:55AM -0400, Chuck Lever wrote:
>>>> Hi Jason-
>>>>
>>>>> On Oct 9, 2020, at 10:39 AM, Jason Gunthorpe <jgg@ziepe.ca> wrote:
>>>>>
>>>>> On Fri, Oct 09, 2020 at 12:49:30PM +0800, Ka-Cheong Poon wrote:
>>>>>> As I mentioned before, this is a very serious restriction on how
>>>>>> the RDMA subsystem can be used in a namespace environment by kernel
>>>>>> module. The reason given for this restriction is that any kernel
>>>>>> socket without a corresponding user space file descriptor is "rogue".
>>>>>> All Internet protocol code create a kernel socket without user
>>>>>> interaction. Are they all "rogue"?
>>>>>
>>>>> You should work with Chuck to make NFS use namespaces properly and
>>>>> then you can propose what changes might be needed with a proper
>>>>> justification.
>>>>
>>>> The NFS server code already uses namespaces for creating listener
>>>> endpoints, already has a user space component that drives the
>>>> creation of listeners, and already passes an appropriate struct
>>>> net to rdma_create_id. As far as I am aware, it is namespace-aware
>>>> and -friendly all the way down to rdma_create_id().
>>>>
>>>> What more needs to be done?
>>>
>>> I have no idea, if you are able to pass a namespace all the way down
>>> to the listening cm_id and everything works right (I'm skeptical) then
>>> there is nothing more to worry about - why are we having this thread?
>>
>> The thread is about RDS, not NFS. NFS has some useful examples to
>> crib, but it's not the main point.
>>
>> I don't think NFS/RDMA namespacing works today, but it's not because
>> NFS isn't ready. I agree that is another thread.
>
> Exactly, so instead of talking about RDS stuff without any patches,
Roger that. Maybe Ka-Cheong and team can propose some patches to
help the discussion along.
> let's talk about NFS with patches - if you can make NFS work then I
> assume RDS will be happy.
Perhaps not a valid assumption :-)
NFS is a traditional client-server model, and has a user space tool
that drives the creation of endpoints, just as you expect.
With RDS, listener endpoints are not visible in user space. They
are a globally-managed shared resource, more like network interfaces
than listener sockets.
Therefore I think the approach is going to be "one RDS listener per
net namespace". The problem Ka-Cheong is trying to address is how to
manage the destruction of a listener-namespace pair. The extra
reference count on the cm_id is pinning the namespace so it cannot
be destroyed.
> NFS has an established model for using namespaces that the other
> transports uses, so I'd rather focus on this.
Understood, but it doesn't seem like there is enough useful overlap
between the NFS and RDS usage scenarios. With NFS, I would expect
an explicit listener shutdown from userland prior to namespace
destruction.
>>>>> The rules for lifetime on IB clients are tricky, and the interaction
>>>>> with namespaces makes it all a lot more murky.
>>>>
>>>> I think what Ka-cheong is asking is for a detailed explanation of
>>>> these lifetime rules so we can understand why rdma_create_id bumps
>>>> the namespace reference count.
>>>
>>> It is because the CM has no code to revoke a CM ID before the
>>> namespace goes away and the pointer becomes invalid.
>>
>> Is it just a question of "no-one has yet written this code" or is
>> there a deeper technical reason why this has not been done?
>
> It is hard to know without spending a big deep look at this
> stuff.
Fair enough.
--
Chuck Lever
chucklever@gmail.com
next prev parent reply other threads:[~2020-10-09 15:27 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 14:02 Finding the namespace of a struct ib_device Ka-Cheong Poon
2020-09-03 17:39 ` Jason Gunthorpe
2020-09-04 4:01 ` Ka-Cheong Poon
2020-09-04 11:32 ` Jason Gunthorpe
2020-09-04 14:02 ` Ka-Cheong Poon
2020-09-06 7:44 ` Leon Romanovsky
2020-09-07 3:33 ` Ka-Cheong Poon
2020-09-07 7:18 ` Leon Romanovsky
2020-09-07 8:24 ` Ka-Cheong Poon
2020-09-07 9:04 ` Leon Romanovsky
2020-09-07 9:28 ` Ka-Cheong Poon
2020-09-07 10:22 ` Leon Romanovsky
2020-09-07 13:48 ` Ka-Cheong Poon
2020-09-29 16:57 ` RDMA subsystem namespace related questions (was Re: Finding the namespace of a struct ib_device) Ka-Cheong Poon
2020-09-29 17:40 ` Jason Gunthorpe
2020-09-30 10:32 ` Ka-Cheong Poon
2020-10-02 14:04 ` Jason Gunthorpe
2020-10-05 10:27 ` Ka-Cheong Poon
2020-10-05 13:16 ` Jason Gunthorpe
2020-10-05 13:57 ` Ka-Cheong Poon
2020-10-05 14:25 ` Jason Gunthorpe
2020-10-05 15:02 ` Ka-Cheong Poon
2020-10-05 15:45 ` Jason Gunthorpe
2020-10-06 9:36 ` Ka-Cheong Poon
2020-10-06 12:46 ` Jason Gunthorpe
2020-10-07 8:38 ` Ka-Cheong Poon
2020-10-07 11:16 ` Leon Romanovsky
2020-10-08 10:22 ` Ka-Cheong Poon
2020-10-08 10:36 ` Leon Romanovsky
2020-10-08 11:08 ` Ka-Cheong Poon
2020-10-08 16:08 ` Jason Gunthorpe
2020-10-08 16:21 ` Chuck Lever
2020-10-08 16:46 ` Jason Gunthorpe
2020-10-09 4:49 ` Ka-Cheong Poon
2020-10-09 14:39 ` Jason Gunthorpe
2020-10-09 14:48 ` Chuck Lever
2020-10-09 14:57 ` Jason Gunthorpe
2020-10-09 15:00 ` Chuck Lever
2020-10-09 15:07 ` Jason Gunthorpe
2020-10-09 15:27 ` Chuck Lever [this message]
2020-10-09 15:34 ` Jason Gunthorpe
2020-10-09 15:52 ` Chuck Lever
2020-10-12 8:20 ` Ka-Cheong Poon
2020-10-16 18:54 ` Jason Gunthorpe
2020-10-16 20:49 ` Chuck Lever
2020-10-19 18:31 ` Jason Gunthorpe
2020-10-07 12:28 ` Jason Gunthorpe
2020-10-08 10:49 ` Ka-Cheong Poon
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=7EC25CA9-27B5-4900-B49C-43D29ED06EB6@gmail.com \
--to=chucklever@gmail.com \
--cc=jgg@ziepe.ca \
--cc=ka-cheong.poon@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox