From: Jason Gunthorpe <jgg@ziepe.ca>
To: Ralph Campbell <rcampbell@nvidia.com>
Cc: Jerome Glisse <jglisse@redhat.com>,
John Hubbard <jhubbard@nvidia.com>,
Christoph Hellwig <hch@lst.de>, Shuah Khan <shuah@kernel.org>,
linux-rdma@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v4 1/2] mm/hmm: make full use of walk_page_range()
Date: Thu, 14 Nov 2019 10:24:09 -0400 [thread overview]
Message-ID: <20191114142409.GA785@ziepe.ca> (raw)
In-Reply-To: <20191104222141.5173-2-rcampbell@nvidia.com>
On Mon, Nov 04, 2019 at 02:21:40PM -0800, Ralph Campbell wrote:
> hmm_range_fault() calls find_vma() and walk_page_range() in a loop.
> This is unnecessary duplication since walk_page_range() calls find_vma()
> in a loop already.
> Simplify hmm_range_fault() by defining a walk_test() callback function
> to filter unhandled vmas.
> This also fixes a bug where hmm_range_fault() was not checking
> start >= vma->vm_start before checking vma->vm_flags so hmm_range_fault()
> could return an error based on the wrong vma for the requested range.
> It also fixes a bug when the vma has no read access and the caller did
> not request a fault, there shouldn't be any error return code.
>
> Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
> Cc: "Jérôme Glisse" <jglisse@redhat.com>
> Cc: Jason Gunthorpe <jgg@mellanox.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> ---
> mm/hmm.c | 121 ++++++++++++++++++++++++++-----------------------------
> 1 file changed, 58 insertions(+), 63 deletions(-)
Applied to hmm.git with Christoph's hunk merged in
Thanks,
Jason
next prev parent reply other threads:[~2019-11-14 14:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 22:21 [PATCH v4 0/2] HMM tests and minor fixes Ralph Campbell
2019-11-04 22:21 ` [PATCH v4 1/2] mm/hmm: make full use of walk_page_range() Ralph Campbell
2019-11-12 15:18 ` Christoph Hellwig
2019-11-12 22:21 ` Ralph Campbell
2019-11-14 14:24 ` Jason Gunthorpe [this message]
2019-11-04 22:21 ` [PATCH v4 2/2] mm/hmm/test: add self tests for HMM Ralph Campbell
2019-11-12 15:25 ` Christoph Hellwig
2019-11-12 21:51 ` Ralph Campbell
2019-11-12 23:45 ` Jason Gunthorpe
2019-11-13 13:51 ` Christoph Hellwig
2019-11-14 23:06 ` Ralph Campbell
2019-11-15 14:06 ` Jason Gunthorpe
2019-11-18 18:32 ` Ralph Campbell
2019-11-18 18:42 ` Jason Gunthorpe
2019-11-13 0:08 ` Andrew Morton
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=20191114142409.GA785@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=hch@lst.de \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=rcampbell@nvidia.com \
--cc=shuah@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;
as well as URLs for NNTP newsgroup(s).