On 11/6/2018 7:38 AM, Jason Gunthorpe wrote:
On Tue, Nov 06, 2018 at 10:54:27AM +0200, Shamir Rabinovitch wrote:
Jason, down the road I need to remove uobject pointers from ib_xx
objects to allow sharing of those ib_xx objects. I can skip patch like
'IB/verbs: destroy_wq verb need ib_udata' and use the ucontext from the
ib_wq->uobject->context but this will not allow sharing of ib_wq. This
series is focused in releasing the ib_pd from telling kernel/user on all
sort of ib_xx objects. But next series will push the ib_ucontext via the
ib_udata to allow me to release the rest of the ib_xx objects from the
dependency in the uobject->ucontext they have.
Most of the other objects have very difficult problems when it comes
to sharing (QP, SRQ, WQ, etc) as they have internal state that is
hardware specific and hard to share. So I don't really expect patches
to make those objects shareable anytime soon, and if we do, then they
can use restrack, etc.
Do you still want to skip patches that add udata to destroy/modify ops?
Any destroy really shouldn't have a udata without a really good reason
- there should not be driver specific data with destroy.
Objects, particularly shared objects, should not be storing things in
the ucontext, as that mucks up the sharing.
That is another reason why QP is very difficult to share as most of
the drivers have per QP state in the uncontext..
So I prefer to not worry right now about anything beyond PD and MR.
Thanks and indeed this will help instead considering all the
objects. PD and MR at least have usecase(s) for sharing.
Regards,
Santosh