From: Jason Gunthorpe <jgg@mellanox.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: "john.hubbard@gmail.com" <john.hubbard@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
John Hubbard <jhubbard@nvidia.com>,
Doug Ledford <dledford@redhat.com>,
Mike Marciniszyn <mike.marciniszyn@intel.com>,
Dennis Dalessandro <dennis.dalessandro@intel.com>,
Christian Benvenuti <benve@cisco.com>, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 1/1] infiniband/mm: convert put_page() to put_user_page*()
Date: Thu, 23 May 2019 17:32:26 +0000 [thread overview]
Message-ID: <20190523173222.GH12145@mellanox.com> (raw)
In-Reply-To: <20190523172852.GA27175@iweiny-DESK2.sc.intel.com>
On Thu, May 23, 2019 at 10:28:52AM -0700, Ira Weiny wrote:
> >
> > @@ -686,8 +686,8 @@ int ib_umem_odp_map_dma_pages(struct ib_umem_odp *umem_odp, u64 user_virt,
> > * ib_umem_odp_map_dma_single_page().
> > */
> > if (npages - (j + 1) > 0)
> > - release_pages(&local_page_list[j+1],
> > - npages - (j + 1));
> > + put_user_pages(&local_page_list[j+1],
> > + npages - (j + 1));
>
> I don't know if we discussed this before but it looks like the use of
> release_pages() was not entirely correct (or at least not necessary) here. So
> I think this is ok.
Oh? John switched it from a put_pages loop to release_pages() here:
commit 75a3e6a3c129cddcc683538d8702c6ef998ec589
Author: John Hubbard <jhubbard@nvidia.com>
Date: Mon Mar 4 11:46:45 2019 -0800
RDMA/umem: minor bug fix in error handling path
1. Bug fix: fix an off by one error in the code that cleans up if it fails
to dma-map a page, after having done a get_user_pages_remote() on a
range of pages.
2. Refinement: for that same cleanup code, release_pages() is better than
put_page() in a loop.
And now we are going to back something called put_pages() that
implements the same for loop the above removed?
Seems like we are going in circles?? John?
Jason
next prev parent reply other threads:[~2019-05-23 17:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 7:25 [PATCH 0/1] infiniband/mm: convert put_page() to put_user_page*() john.hubbard
2019-05-23 7:25 ` [PATCH 1/1] " john.hubbard
2019-05-23 15:31 ` Jerome Glisse
2019-05-23 17:56 ` John Hubbard
2019-05-23 17:28 ` Ira Weiny
2019-05-23 17:32 ` Jason Gunthorpe [this message]
2019-05-23 17:46 ` John Hubbard
2019-05-23 19:04 ` Ira Weiny
2019-05-23 19:13 ` John Hubbard
2019-05-23 22:37 ` Ira Weiny
2019-05-23 22:50 ` John Hubbard
2019-05-23 22:54 ` John Hubbard
2019-05-23 19:17 ` Jason Gunthorpe
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=20190523173222.GH12145@mellanox.com \
--to=jgg@mellanox.com \
--cc=akpm@linux-foundation.org \
--cc=benve@cisco.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=ira.weiny@intel.com \
--cc=jack@suse.cz \
--cc=jhubbard@nvidia.com \
--cc=john.hubbard@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@intel.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).