Messages in this thread | | | Subject | Re: [PATCH 13/15] mm/hmm: factor out pte and pmd handling to simplify hmm_vma_walk_pmd() | From | John Hubbard <> | Date | Wed, 21 Mar 2018 15:36:01 -0700 |
| |
On 03/21/2018 08:08 AM, Jerome Glisse wrote: > On Tue, Mar 20, 2018 at 10:07:29PM -0700, John Hubbard wrote: >> On 03/19/2018 07:00 PM, jglisse@redhat.com wrote: >>> From: Jérôme Glisse <jglisse@redhat.com>
<snip>
>>> +static int hmm_vma_handle_pmd(struct mm_walk *walk, >>> + unsigned long addr, >>> + unsigned long end, >>> + uint64_t *pfns, >> >> Hi Jerome, >> >> Nice cleanup, it makes it much easier to follow the code now. >> >> Let's please rename the pfns argument above to "pfn", because in this >> helper (and the _pte helper too), there is only one pfn involved, rather >> than an array of them. > > This is only true to handle_pte, for handle_pmd it will go over several > pfn entries. But they will all get fill with same value modulo pfn which > will increase monotically (ie same flag as pmd permissions apply to all > entries).
oops, yes you are right about handle_pmd.
> > Note sure s/pfns/pfn for hmm_vma_handle_pte() warrant a respin.
Probably not, unless there is some other reason to respin. Anyway, this patch looks good either way, I think, so you can still add:
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
thanks, -- John Hubbard NVIDIA
| |