On Mon, Nov 05, 2018 at 01:56:28PM -0700, Jason Gunthorpe wrote: > On Mon, Nov 05, 2018 at 04:27:40PM +0200, Shamir Rabinovitch wrote: > > On Mon, Nov 05, 2018 at 08:54:22AM +0200, Shamir Rabinovitch wrote: > > > On Sun, Nov 04, 2018 at 02:20:51PM +0200, Shamir Rabinovitch wrote: > > > > On Sun, Nov 04, 2018 at 10:36:32AM +0200, Shamir Rabinovitch wrote: > > > > > On Wed, Oct 31, 2018 at 11:55:15AM -0600, Jason Gunthorpe wrote: > > > > > > On Wed, Oct 31, 2018 at 02:42:42PM +0200, Shamir Rabinovitch wrote: [...] > > > > Jason, Series #2 (pending on series #1) add ib_udata in ib_device > > callbacks. I noticed that if I add those patches to series #1 I can use > > ib_udata in almost all the places as you wanted. I have created and > > tested this new patch set and it is on my github. I think it can solve > > some of the issues you had with v3 of the patch set. Please tell me if > > you like me to post this revised patch set here instead of fixing the > > current patch set. > > I don't know if you should add udata to destroy... That is quite weird. > > It is important to keep things ordered - the userness of an object > during creation is tested by the udata parameter, then the userness of > that object should be checked by restack's is_user/or uobject for the > rest of its lifetime. Jason, Please see below why using uobject is not good option. Please tell me if you think that I need to add those objects (like ib_wq) to the restrack. I thought there was a reason they are not part of the restrack in first place but I might be wrong here. > > It is not good to assume udata to non-creation ops like modify or > destroy implies anything about the userness of the object in the first > place.. > > Anyhow, it seems fine to drop some of the udata patches into this > series if using udata means less uses of is_user_pd... > > Jason 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. Do you still want to skip patches that add udata to destroy/modify ops? Thanks