From: Christoph Hellwig <hch@lst.de>
To: Ralph Campbell <rcampbell@nvidia.com>
Cc: Jerome Glisse <jglisse@redhat.com>,
John Hubbard <jhubbard@nvidia.com>,
Christoph Hellwig <hch@lst.de>,
Jason Gunthorpe <jgg@mellanox.com>, 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: Tue, 12 Nov 2019 16:18:56 +0100 [thread overview]
Message-ID: <20191112151856.GB12550@lst.de> (raw)
In-Reply-To: <20191104222141.5173-2-rcampbell@nvidia.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
Although we could clean this up a tidbit more by removing the start
variable:
diff --git a/mm/hmm.c b/mm/hmm.c
index d4984a08ed9b..b5b1ed646c2f 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -667,10 +667,9 @@ static const struct mm_walk_ops hmm_walk_ops = {
*/
long hmm_range_fault(struct hmm_range *range, unsigned int flags)
{
- unsigned long start = range->start;
struct hmm_vma_walk hmm_vma_walk = {
.range = range,
- .last = start,
+ .last = range->start,
.flags = flags,
};
struct mm_struct *mm = range->notifier->mm;
@@ -682,9 +681,8 @@ long hmm_range_fault(struct hmm_range *range, unsigned int flags)
/* If range is no longer valid force retry. */
if (mmu_range_check_retry(range->notifier, range->notifier_seq))
return -EBUSY;
- ret = walk_page_range(mm, start, range->end, &hmm_walk_ops,
- &hmm_vma_walk);
- start = hmm_vma_walk.last;
+ ret = walk_page_range(mm, hmm_vma_walk.last, range->end,
+ &hmm_walk_ops, &hmm_vma_walk);
} while (ret == -EBUSY);
if (ret)
next prev parent reply other threads:[~2019-11-12 15:19 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 [this message]
2019-11-12 22:21 ` Ralph Campbell
2019-11-14 14:24 ` Jason Gunthorpe
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=20191112151856.GB12550@lst.de \
--to=hch@lst.de \
--cc=jgg@mellanox.com \
--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).