From: Michal Kalderon <mkalderon@marvell.com>
To: Gal Pressman <galpress@amazon.com>
Cc: Ariel Elior <aelior@marvell.com>, "jgg@ziepe.ca" <jgg@ziepe.ca>,
"dledford@redhat.com" <dledford@redhat.com>,
"bmt@zurich.ibm.com" <bmt@zurich.ibm.com>,
"sleybo@amazon.com" <sleybo@amazon.com>,
"leon@kernel.org" <leon@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: RE: [PATCH v7 rdma-next 2/7] RDMA/core: Create mmap database and cookie helper functions
Date: Mon, 26 Aug 2019 08:41:42 +0000 [thread overview]
Message-ID: <MN2PR18MB31827E71327561187B74F615A1A10@MN2PR18MB3182.namprd18.prod.outlook.com> (raw)
In-Reply-To: <10dc3958-7968-a3dc-3ab5-a64a270bdfdb@amazon.com>
> From: Gal Pressman <galpress@amazon.com>
> Sent: Sunday, August 25, 2019 1:40 PM
>
> On 25/08/2019 11:36, Michal Kalderon wrote:
> >>> diff --git a/drivers/infiniband/core/rdma_core.c
> >>> b/drivers/infiniband/core/rdma_core.c
> >>> index ccf4d069c25c..7166741834c8 100644
> >>> --- a/drivers/infiniband/core/rdma_core.c
> >>> +++ b/drivers/infiniband/core/rdma_core.c
> >>> @@ -817,6 +817,7 @@ static void ufile_destroy_ucontext(struct
> >> ib_uverbs_file *ufile,
> >>> rdma_restrack_del(&ucontext->res);
> >>>
> >>> ib_dev->ops.dealloc_ucontext(ucontext);
> >>> + rdma_user_mmap_entries_remove_free(ucontext);
> >>
> >> Why did you switch the order again?
> > To enable drivers to remove the entries from the mmap_xa otherwise
> > entires_remove_free Will run into a mmap_xa that is not empty. I should
> have mentioned this in the cover letter.
>
> I don't understand.
> Do you expect drivers to explicitly drain the mmap xarray during
> dealloc_ucontext? I didn't see that in the EFA patch.
>
> I still think the xarray should be cleared prior to calling the driver's
> dealloc_ucontext.
Drivers don't need to explicitly drain the xarray, but in qedr the driver inserts
An entry during alloc_ucontext, and therefore should remove the entry on dealloc
Ucontext. We want to reacc the remove_free function with no entries. When going
Over this code again I think I can completely remove the function and just add a
WARN_ON on the dealloc_ucontext function. Having an entry at this point means there
Is a leak.
next prev parent reply other threads:[~2019-08-26 8:42 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 12:18 [PATCH v7 rdma-next 0/7] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 1/7] RDMA/core: Move core content from ib_uverbs to ib_core Michal Kalderon
2019-08-20 12:58 ` Jason Gunthorpe
2019-08-20 21:30 ` Michal Kalderon
2019-08-21 16:30 ` Michal Kalderon
2019-08-20 14:08 ` Gal Pressman
2019-08-20 21:32 ` Michal Kalderon
2019-08-21 6:06 ` Gal Pressman
2019-08-21 7:56 ` Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 2/7] RDMA/core: Create mmap database and cookie helper functions Michal Kalderon
2019-08-20 13:21 ` Jason Gunthorpe
2019-08-20 21:23 ` [EXT] " Michal Kalderon
2019-08-21 16:47 ` Michal Kalderon
2019-08-21 16:51 ` Jason Gunthorpe
2019-08-21 17:14 ` Michal Kalderon
2019-08-21 17:37 ` Jason Gunthorpe
2019-08-26 11:53 ` Michal Kalderon
2019-08-26 12:01 ` Gal Pressman
2019-08-22 8:35 ` Gal Pressman
2019-08-25 8:36 ` Michal Kalderon
2019-08-25 10:39 ` Gal Pressman
2019-08-26 8:41 ` Michal Kalderon [this message]
2019-08-26 15:30 ` Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 3/7] RDMA/efa: Use the common mmap_xa helpers Michal Kalderon
2019-08-22 13:18 ` Gal Pressman
2019-08-25 8:41 ` Michal Kalderon
2019-08-25 10:45 ` Gal Pressman
2019-08-26 8:42 ` Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 4/7] RDMA/siw: " Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 5/7] RDMA/qedr: Use the common mmap API Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 6/7] RDMA/qedr: Add doorbell overflow recovery support Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 7/7] RDMA/qedr: Add iWARP doorbell " Michal Kalderon
2019-08-20 18:31 ` [PATCH v7 rdma-next 0/7] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA Gal Pressman
2019-08-21 8:03 ` Michal Kalderon
2019-08-21 10:15 ` Gal Pressman
2019-08-21 10:32 ` Michal Kalderon
2019-08-21 10:41 ` Gal Pressman
2019-08-21 12:25 ` Gal Pressman
2019-08-21 16:23 ` Gal Pressman
2019-08-21 16:27 ` Michal Kalderon
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=MN2PR18MB31827E71327561187B74F615A1A10@MN2PR18MB3182.namprd18.prod.outlook.com \
--to=mkalderon@marvell.com \
--cc=aelior@marvell.com \
--cc=bmt@zurich.ibm.com \
--cc=dledford@redhat.com \
--cc=galpress@amazon.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sleybo@amazon.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).