Re: [PATCH v5] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTINUE behavior

2021-04-08 Thread Hugh Dickins
On Thu, 8 Apr 2021, Axel Rasmussen wrote: > On Tue, Apr 6, 2021 at 4:49 PM Peter Xu wrote: > > On Mon, Apr 05, 2021 at 10:19:17AM -0700, Axel Rasmussen wrote: ... > > > --- a/mm/userfaultfd.c > > > +++ b/mm/userfaultfd.c ... > > > + > > > + if (is_file_backed) { > > > + /* The shme

Re: [PATCH v5] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTINUE behavior

2021-04-08 Thread Axel Rasmussen
On Tue, Apr 6, 2021 at 4:49 PM Peter Xu wrote: > > On Mon, Apr 05, 2021 at 10:19:17AM -0700, Axel Rasmussen wrote: > > Previously, the continue implementation in shmem_mcopy_atomic_pte was > > incorrect for two main reasons: > > > > - It didn't correctly skip some sections of code which make sense

Re: [PATCH v5] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTINUE behavior

2021-04-06 Thread Peter Xu
On Mon, Apr 05, 2021 at 10:19:17AM -0700, Axel Rasmussen wrote: > Previously, the continue implementation in shmem_mcopy_atomic_pte was > incorrect for two main reasons: > > - It didn't correctly skip some sections of code which make sense for > newly allocated pages, but absolutely don't make s

[PATCH v5] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTINUE behavior

2021-04-05 Thread Axel Rasmussen
Previously, the continue implementation in shmem_mcopy_atomic_pte was incorrect for two main reasons: - It didn't correctly skip some sections of code which make sense for newly allocated pages, but absolutely don't make sense for pre-existing page cache pages. - Because shmem_mcopy_continue_