Re: [PATCH v3] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTNUE behavior

2021-03-31 Thread Peter Xu
Axel, On Tue, Mar 30, 2021 at 04:30:13PM -0700, Axel Rasmussen wrote: > Yes, a refactor like that is promising. It's hard to say for certain > without actually looking at the result - I'll spend some time tomorrow > on a few options, and send along the cleanest version I come up with. Before you

Re: [PATCH v3] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTNUE behavior

2021-03-30 Thread Axel Rasmussen
On Tue, Mar 30, 2021 at 1:55 PM Peter Xu wrote: > > On Mon, Mar 29, 2021 at 04:41:31PM -0700, Axel Rasmussen wrote: > > Previously, we shared too much of the code with COPY and ZEROPAGE, so we > > manipulated things in various invalid ways: > > > > - Previously, we unconditionally called shmem_ino

Re: [PATCH v3] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTNUE behavior

2021-03-30 Thread Peter Xu
On Mon, Mar 29, 2021 at 04:41:31PM -0700, Axel Rasmussen wrote: > Previously, we shared too much of the code with COPY and ZEROPAGE, so we > manipulated things in various invalid ways: > > - Previously, we unconditionally called shmem_inode_acct_block. In the > continue case, we're looking up an

[PATCH v3] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTNUE behavior

2021-03-29 Thread Axel Rasmussen
Previously, we shared too much of the code with COPY and ZEROPAGE, so we manipulated things in various invalid ways: - Previously, we unconditionally called shmem_inode_acct_block. In the continue case, we're looking up an existing page which would have been accounted for properly when it was