Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-20 Thread Kalesh Singh
On Thu, May 20, 2021 at 4:01 PM Peter Xu wrote: > > On Thu, May 20, 2021 at 03:06:30PM -0400, Zi Yan wrote: > > On 20 May 2021, at 10:57, Peter Xu wrote: > > > > > On Thu, May 20, 2021 at 07:07:57PM +0530, Aneesh Kumar K.V wrote: > > >> "Aneesh Kumar K.V" writes: > > >> > > >>> On 5/20/21 6:16 PM

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-20 Thread Peter Xu
On Thu, May 20, 2021 at 03:06:30PM -0400, Zi Yan wrote: > On 20 May 2021, at 10:57, Peter Xu wrote: > > > On Thu, May 20, 2021 at 07:07:57PM +0530, Aneesh Kumar K.V wrote: > >> "Aneesh Kumar K.V" writes: > >> > >>> On 5/20/21 6:16 PM, Peter Xu wrote: > On Thu, May 20, 2021 at 01:56:54PM +053

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-20 Thread Zi Yan
On 20 May 2021, at 10:57, Peter Xu wrote: > On Thu, May 20, 2021 at 07:07:57PM +0530, Aneesh Kumar K.V wrote: >> "Aneesh Kumar K.V" writes: >> >>> On 5/20/21 6:16 PM, Peter Xu wrote: On Thu, May 20, 2021 at 01:56:54PM +0530, Aneesh Kumar K.V wrote: >> This seems to work at least for my u

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-20 Thread Peter Xu
On Thu, May 20, 2021 at 07:07:57PM +0530, Aneesh Kumar K.V wrote: > "Aneesh Kumar K.V" writes: > > > On 5/20/21 6:16 PM, Peter Xu wrote: > >> On Thu, May 20, 2021 at 01:56:54PM +0530, Aneesh Kumar K.V wrote: > This seems to work at least for my userfaultfd test on shmem, however I > do

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-20 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > On 5/20/21 6:16 PM, Peter Xu wrote: >> On Thu, May 20, 2021 at 01:56:54PM +0530, Aneesh Kumar K.V wrote: This seems to work at least for my userfaultfd test on shmem, however I don't fully understand the commit message [1] on: How do we guarantee we're

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-20 Thread Aneesh Kumar K.V
On 5/20/21 6:16 PM, Peter Xu wrote: On Thu, May 20, 2021 at 01:56:54PM +0530, Aneesh Kumar K.V wrote: This seems to work at least for my userfaultfd test on shmem, however I don't fully understand the commit message [1] on: How do we guarantee we're not moving a thp pte? move_page_tables() ch

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-20 Thread Peter Xu
On Thu, May 20, 2021 at 01:56:54PM +0530, Aneesh Kumar K.V wrote: > > This seems to work at least for my userfaultfd test on shmem, however I > > don't > > fully understand the commit message [1] on: How do we guarantee we're not > > moving a thp pte? > > > > move_page_tables() checks for pmd_tr

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-20 Thread Aneesh Kumar K.V
On 5/20/21 7:48 AM, Peter Xu wrote: On Wed, May 19, 2021 at 10:16:07AM +0530, Aneesh Kumar K.V wrote: On Thu, Apr 22, 2021 at 11:13:17AM +0530, Aneesh Kumar K.V wrote: pmd/pud_populate is the right interface to be used to set the respective page table entries. Some architectures like ppc64 do a

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-19 Thread Peter Xu
On Wed, May 19, 2021 at 10:16:07AM +0530, Aneesh Kumar K.V wrote: > > On Thu, Apr 22, 2021 at 11:13:17AM +0530, Aneesh Kumar K.V wrote: > >> pmd/pud_populate is the right interface to be used to set the respective > >> page table entries. Some architectures like ppc64 do assume that > >> set_pmd/p

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-19 Thread Nathan Chancellor
On 5/18/2021 9:46 PM, Aneesh Kumar K.V wrote: Nathan Chancellor writes: Hi Aneesh, On Thu, Apr 22, 2021 at 11:13:17AM +0530, Aneesh Kumar K.V wrote: pmd/pud_populate is the right interface to be used to set the respective page table entries. Some architectures like ppc64 do assume that set_p

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-18 Thread Aneesh Kumar K.V
Nathan Chancellor writes: > Hi Aneesh, > > On Thu, Apr 22, 2021 at 11:13:17AM +0530, Aneesh Kumar K.V wrote: >> pmd/pud_populate is the right interface to be used to set the respective >> page table entries. Some architectures like ppc64 do assume that >> set_pmd/pud_at >> can only be used to se

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-18 Thread Nathan Chancellor
Hi Aneesh, On Thu, Apr 22, 2021 at 11:13:17AM +0530, Aneesh Kumar K.V wrote: > pmd/pud_populate is the right interface to be used to set the respective > page table entries. Some architectures like ppc64 do assume that > set_pmd/pud_at > can only be used to set a hugepage PTE. Since we are not se

[PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-04-21 Thread Aneesh Kumar K.V
pmd/pud_populate is the right interface to be used to set the respective page table entries. Some architectures like ppc64 do assume that set_pmd/pud_at can only be used to set a hugepage PTE. Since we are not setting up a hugepage PTE here, use the pmd/pud_populate interface. Signed-off-by: Anees