On Fri, Apr 19, 2024 at 3:15 PM Jeff Xu wrote:
>
> On Fri, Apr 19, 2024 at 7:57 AM Suren Baghdasaryan wrote:
> >
> > On Thu, Apr 18, 2024 at 6:22 PM Jeff Xu wrote:
> > >
> > > On Thu, Apr 18, 2024 at 1:19 PM Suren Baghdasaryan
> > > wrote:
> >
On Thu, Apr 18, 2024 at 6:22 PM Jeff Xu wrote:
>
> On Thu, Apr 18, 2024 at 1:19 PM Suren Baghdasaryan wrote:
> >
> > On Tue, Apr 16, 2024 at 12:40 PM Jeff Xu wrote:
> > >
> > > On Tue, Apr 16, 2024 at 8:13 AM Liam R. Howlett
> > > wrote:
> &g
On Tue, Apr 16, 2024 at 12:40 PM Jeff Xu wrote:
>
> On Tue, Apr 16, 2024 at 8:13 AM Liam R. Howlett
> wrote:
> >
> > * jef...@chromium.org [240415 12:35]:
> > > From: Jeff Xu
> > >
> > > This is V10 version, it rebases v9 patch to 6.9.rc3.
> > > We also applied and tested mseal() in chrome and
On Fri, Feb 2, 2024 at 8:46 PM Liam R. Howlett wrote:
>
> * Linus Torvalds [240202 18:36]:
> > On Fri, 2 Feb 2024 at 13:18, Liam R. Howlett
> > wrote:
> > >
> > > There will be a larger performance cost to checking up front without
> > > allowing the partial completion.
> >
> > I suspect that f
Reported-by: Dan Carpenter
Closes: https://lore.kernel.org/r/202401300107.u8imaktl-...@intel.com/
Signed-off-by: Suren Baghdasaryan
---
Changes since v1 [1]
- Added missing double_pt_unlock in move_zeropage_pte, per Dan Carpenter
- Added Reported-by and Closes tags per bug report [2]
Applies cleanly
On Wed, Jan 24, 2024 at 4:13 PM Suren Baghdasaryan wrote:
>
> Current implementation of UFFDIO_MOVE fails to move zeropages and returns
> EBUSY when it encounters one. We can handle them by mapping a zeropage
> at the destination and clearing the mapping at the source. This is don
Current implementation of UFFDIO_MOVE fails to move zeropages and returns
EBUSY when it encounters one. We can handle them by mapping a zeropage
at the destination and clearing the mapping at the source. This is done
both for ordinary and for huge zeropages.
Signed-off-by: Suren Baghdasaryan
On Tue, Jan 2, 2024 at 3:16 PM Suren Baghdasaryan wrote:
>
> On Tue, Jan 2, 2024 at 8:58 AM Suren Baghdasaryan wrote:
> >
> > On Tue, Jan 2, 2024 at 1:00 AM Peter Xu wrote:
> > >
> > > On Fri, Dec 29, 2023 at 06:56:07PM -0800, Suren Baghdasaryan wrote:
>
that contains the src_addr.
Fixes: 94b01c885131 ("userfaultfd: UFFDIO_MOVE uABI")
Signed-off-by: Suren Baghdasaryan
---
Changes from v1 [1]:
1. Reset src_folio and src_folio_pte after folio is split, per Peter Xu
[1] https://lore.kernel.org/all/20231230025607.2476912-1-sur...@google
On Tue, Jan 2, 2024 at 8:58 AM Suren Baghdasaryan wrote:
>
> On Tue, Jan 2, 2024 at 1:00 AM Peter Xu wrote:
> >
> > On Fri, Dec 29, 2023 at 06:56:07PM -0800, Suren Baghdasaryan wrote:
> > > @@ -1078,9 +1078,14 @@ static int move_pages_pte(struct mm_struct *mm,
On Tue, Jan 2, 2024 at 1:00 AM Peter Xu wrote:
>
> On Fri, Dec 29, 2023 at 06:56:07PM -0800, Suren Baghdasaryan wrote:
> > @@ -1078,9 +1078,14 @@ static int move_pages_pte(struct mm_struct *mm,
> > pmd_t *dst_pmd, pmd_t *src_pmd,
> >
> > /* at this
Sorry, I screwed up when sending it out. It's not [1/2], it's supposed
to be a stand-alone patch. IOW, don't expect a [2/2] followup :)
On Fri, Dec 29, 2023 at 6:56 PM Suren Baghdasaryan wrote:
>
> Add a test for UFFDIO_MOVE ioctl operating on a hugepage which has
Add a test for UFFDIO_MOVE ioctl operating on a hugepage which has to
be split because destination is marked with MADV_NOHUGEPAGE. With this
we cover all 3 cases: normal page move, hugepage move, hugepage splitting
before move.
Signed-off-by: Suren Baghdasaryan
---
Patch applies over mm-unstable
this
by unmapping the PTEs and exiting RCU read section before splitting the
folio and then retrying. The same retry pattern is used when locking the
folio or anon_vma in this function.
Fixes: 94b01c885131 ("userfaultfd: UFFDIO_MOVE uABI")
Signed-off-by: Suren Baghdasaryan
---
Patch appl
On Mon, Dec 11, 2023 at 8:34 AM Mark Brown wrote:
>
> On Mon, Dec 11, 2023 at 08:29:06AM -0800, Suren Baghdasaryan wrote:
>
> > Just to rule out this possibility, linux-next was broken on Friday
> > (see
> > https://lore.kernel.org/all/cajucfpfieqro4qkfzbuc
On Mon, Dec 11, 2023 at 8:25 AM Mark Brown wrote:
>
> On Mon, Dec 11, 2023 at 08:15:11AM -0800, Suren Baghdasaryan wrote:
> > On Mon, Dec 11, 2023 at 4:24 AM Mark Brown wrote:
>
> > > Oh, it's obviously the new headers not being installed. The builds
> > >
On Mon, Dec 11, 2023 at 4:24 AM Mark Brown wrote:
>
> On Mon, Dec 11, 2023 at 01:03:27PM +0100, David Hildenbrand wrote:
> > On 11.12.23 12:15, Mark Brown wrote:
>
> > > This is linux-next. I pasted the commands used to build and sent links
> > > to a full build log in the original report.
>
> >
On Sun, Dec 10, 2023 at 5:01 PM Suren Baghdasaryan wrote:
>
> On Sun, Dec 10, 2023 at 6:26 AM Mark Brown wrote:
> >
> > On Wed, Dec 06, 2023 at 02:36:59AM -0800, Suren Baghdasaryan wrote:
> > > Add tests for new UFFDIO_MOVE ioctl which uses uffd to move source
> >
On Sun, Dec 10, 2023 at 6:26 AM Mark Brown wrote:
>
> On Wed, Dec 06, 2023 at 02:36:59AM -0800, Suren Baghdasaryan wrote:
> > Add tests for new UFFDIO_MOVE ioctl which uses uffd to move source
> > into destination buffer while checking the contents of both after
> > the m
On Wed, Dec 6, 2023 at 2:30 AM Suren Baghdasaryan wrote:
>
> On Wed, Dec 6, 2023 at 1:21 AM David Hildenbrand wrote:
> >
> > On 05.12.23 05:46, Suren Baghdasaryan wrote:
> > > On Mon, Dec 4, 2023 at 10:44 AM Suren Baghdasaryan
> > > wrote:
> > >&
eroed. Separate tests are designed for PMD aligned and
unaligned cases because they utilize different code paths in the kernel.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 24 +++
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm
emory area before fork().
ENOMEM Allocating memory needed for the operation failed.
ESRCH
The target process has exited at the time of a UFFDIO_MOVE
operation.
Signed-off-by: Andrea Arcangeli
Signed-off-by: Suren Baghdasaryan
---
Documentation/admin-gui
, some of which will be used in the next patch to
implement test-specific operations like madvise after memory is allocated
but before it is accessed.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 13 +
tools/testing/selftests/mm/uffd-common.h
that folio_move_anon_rmap() must only be called if the anon page is
exclusive to a process, and must not be called on KSM folios.
This is a preparation for UFFDIO_MOVE, which will hold the folio lock,
the anon_vma lock in write mode, and the mmap_lock in read mode.
Signed-off-by: Andrea Arcangeli
Signed-off-by:
uffd_test_ctx_clear() after each test is done.
Signed-off-by: Suren Baghdasaryan
Reviewed-by: Peter Xu
Reviewed-by: Axel Rasmussen
---
tools/testing/selftests/mm/uffd-common.c | 4 +---
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm/uffd-stress.c | 5 -
tools
pport move to different root anon_vma in
folio_move_anon_rmap()
userfaultfd: UFFDIO_MOVE uABI
Suren Baghdasaryan (3):
selftests/mm: call uffd_test_ctx_clear at the end of the test
selftests/mm: add uffd_test_case_ops to allow test case-specific
operations
selftests/mm: add UFFDIO_MOVE i
On Wed, Dec 6, 2023 at 1:21 AM David Hildenbrand wrote:
>
> On 05.12.23 05:46, Suren Baghdasaryan wrote:
> > On Mon, Dec 4, 2023 at 10:44 AM Suren Baghdasaryan
> > wrote:
> >>
> >> On Mon, Dec 4, 2023 at 10:27 AM David Hildenbrand wrote:
> >>>
&
On Mon, Dec 4, 2023 at 10:44 AM Suren Baghdasaryan wrote:
>
> On Mon, Dec 4, 2023 at 10:27 AM David Hildenbrand wrote:
> >
> > On 04.12.23 17:35, Suren Baghdasaryan wrote:
> > > On Mon, Dec 4, 2023 at 1:27 AM Ryan Roberts wrote:
> > >>
> > >
On Mon, Dec 4, 2023 at 10:27 AM David Hildenbrand wrote:
>
> On 04.12.23 17:35, Suren Baghdasaryan wrote:
> > On Mon, Dec 4, 2023 at 1:27 AM Ryan Roberts wrote:
> >>
> >> On 04/12/2023 04:09, Suren Baghdasaryan wrote:
> >>> On Sat, Dec 2
On Mon, Dec 4, 2023 at 1:27 AM Ryan Roberts wrote:
>
> On 04/12/2023 04:09, Suren Baghdasaryan wrote:
> > On Sat, Dec 2, 2023 at 2:11 AM David Hildenbrand wrote:
> >>
> >> On 02.12.23 09:04, Ryan Roberts wrote:
> >>> On 01/12/2023 20:47, David Hildenb
On Sat, Dec 2, 2023 at 2:11 AM David Hildenbrand wrote:
>
> On 02.12.23 09:04, Ryan Roberts wrote:
> > On 01/12/2023 20:47, David Hildenbrand wrote:
> >> On 01.12.23 10:29, Ryan Roberts wrote:
> >>> On 21/11/2023 17:16, Suren Baghdasaryan wrote:
> >>&g
On Fri, Dec 1, 2023 at 12:47 PM David Hildenbrand wrote:
>
> On 01.12.23 10:29, Ryan Roberts wrote:
> > On 21/11/2023 17:16, Suren Baghdasaryan wrote:
> >> Add tests for new UFFDIO_MOVE ioctl which uses uffd to move source
> >> into destination buffer while check
On Fri, Dec 1, 2023 at 1:29 AM Ryan Roberts wrote:
>
> On 21/11/2023 17:16, Suren Baghdasaryan wrote:
> > Add tests for new UFFDIO_MOVE ioctl which uses uffd to move source
> > into destination buffer while checking the contents of both after
> > the move. After the oper
eroed. Separate tests are designed for PMD aligned and
unaligned cases because they utilize different code paths in the kernel.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 24 +++
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm
, some of which will be used in the next patch to
implement test-specific operations like madvise after memory is allocated
but before it is accessed.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 13 +
tools/testing/selftests/mm/uffd-common.h
emory area before fork().
ENOMEM Allocating memory needed for the operation failed.
ESRCH
The target process has exited at the time of a UFFDIO_MOVE
operation.
Signed-off-by: Andrea Arcangeli
Signed-off-by: Suren Baghdasaryan
---
Documentation/admin-gui
uffd_test_ctx_clear() after each test is done.
Signed-off-by: Suren Baghdasaryan
Reviewed-by: Peter Xu
Reviewed-by: Axel Rasmussen
---
tools/testing/selftests/mm/uffd-common.c | 4 +---
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm/uffd-stress.c | 5 -
tools
that folio_move_anon_rmap() must only be called if the anon page is
exclusive to a process, and must not be called on KSM folios.
This is a preparation for UFFDIO_MOVE, which will hold the folio lock,
the anon_vma lock in write mode, and the mmap_lock in read mode.
Signed-off-by: Andrea Arcangeli
Signed-off-by:
om/
[9] https://lore.kernel.org/all/20231028003819.652322-1-sur...@google.com/
Andrea Arcangeli (2):
mm/rmap: support move to different root anon_vma in
folio_move_anon_rmap()
userfaultfd: UFFDIO_MOVE uABI
Suren Baghdasaryan (3):
selftests/mm: call uffd_test_ctx_clear at the end of the test
selftests/
On Mon, Oct 30, 2023 at 1:35 PM Peter Xu wrote:
>
> On Mon, Oct 30, 2023 at 01:22:02PM -0700, Suren Baghdasaryan wrote:
> > > > +static int adjust_page_size(void)
> > > > +{
> > > > + page_size = default_huge_page_size();
> > >
>
On Mon, Oct 30, 2023 at 1:14 PM Peter Xu wrote:
>
> On Fri, Oct 27, 2023 at 05:38:15PM -0700, Suren Baghdasaryan wrote:
> > Add tests for new UFFDIO_MOVE ioctl which uses uffd to move source
> > into destination buffer while checking the contents of both after
> > the m
emory area before fork().
ENOMEM Allocating memory needed for the operation failed.
ESRCH
The target process has exited at the time of a UFFDIO_MOVE
operation.
Signed-off-by: Andrea Arcangeli
Signed-off-by: Suren Baghdasaryan
---
Documentation/admin-gui
eroed. Separate tests are designed for PMD aligned and
unaligned cases because they utilize different code paths in the kernel.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 24
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm
operations are added, some of which will be used in the next
patch to implement test-specific customizations like area re-alignment,
page size overrides and madvise after memory allocations but before
memory is accessed.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c
uffd_test_ctx_clear() after each test is done.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 4 +---
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm/uffd-stress.c | 5 -
tools/testing/selftests/mm/uffd-unit-tests.c | 1 +
4 files
that folio_move_anon_rmap() must only be called if the anon page is
exclusive to a process, and must not be called on KSM folios.
This is a preparation for UFFDIO_MOVE, which will hold the folio lock,
the anon_vma lock in write mode, and the mmap_lock in read mode.
Signed-off-by: Andrea Arcangeli
Signed-off-by:
to different root anon_vma in
folio_move_anon_rmap()
userfaultfd: UFFDIO_MOVE uABI
Suren Baghdasaryan (3):
selftests/mm: call uffd_test_ctx_clear at the end of the test
selftests/mm: add uffd_test_case_ops to allow test case-specific
operations
selftests/mm: add UFFDIO_MOVE ioctl test
Documentation/
On Tue, Oct 24, 2023 at 7:27 AM David Hildenbrand wrote:
>
> On 23.10.23 20:56, Suren Baghdasaryan wrote:
> > On Mon, Oct 23, 2023 at 5:29 AM David Hildenbrand wrote:
> >>
> >> Focusing on validate_remap_areas():
> >>
> >>> +
> >>>
On Mon, Oct 23, 2023 at 11:37 AM Peter Xu wrote:
>
> On Mon, Oct 23, 2023 at 10:43:49AM -0700, Suren Baghdasaryan wrote:
> > > Maybe we should follow what it does with mremap()? Then your current code
> > > is fine. Maybe that's the better start.
> >
> >
On Mon, Oct 23, 2023 at 8:53 AM David Hildenbrand wrote:
>
> On 23.10.23 14:29, David Hildenbrand wrote:
> >> +
> >> +/* Only allow remapping if both are mlocked or both aren't */
> >> +if ((src_vma->vm_flags & VM_LOCKED) != (dst_vma->vm_flags &
> >> VM_LOCKED))
> >> +return -
On Mon, Oct 23, 2023 at 5:29 AM David Hildenbrand wrote:
>
> Focusing on validate_remap_areas():
>
> > +
> > +static int validate_remap_areas(struct vm_area_struct *src_vma,
> > + struct vm_area_struct *dst_vma)
> > +{
> > + /* Only allow remapping if both have the
On Sun, Oct 22, 2023 at 10:02 AM Peter Xu wrote:
>
> On Thu, Oct 19, 2023 at 02:24:06PM -0700, Suren Baghdasaryan wrote:
> > On Thu, Oct 12, 2023 at 3:00 PM Peter Xu wrote:
> > >
> > > On Sun, Oct 08, 2023 at 11:42:27PM -0700, Suren Baghdasaryan wrote:
On Mon, Oct 23, 2023 at 9:36 AM David Hildenbrand wrote:
>
> On 23.10.23 14:03, David Hildenbrand wrote:
> > On 22.10.23 17:46, Peter Xu wrote:
> >> On Fri, Oct 20, 2023 at 07:16:19PM +0200, David Hildenbrand wrote:
> >>> These are rather the vibes I'm getting from Peter. "Why rename it, could
> >
On Fri, Oct 20, 2023 at 3:02 AM David Hildenbrand wrote:
>
> On 19.10.23 21:53, Peter Xu wrote:
> > On Thu, Oct 19, 2023 at 05:41:01PM +0200, David Hildenbrand wrote:
> >> That's not my main point. It can easily become a maintenance burden without
> >> any real use cases yet that we are willing to
rc6]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url:
> https://github.com/intel-lab-lkp/linu
On Fri, Oct 13, 2023 at 9:08 AM Peter Xu wrote:
>
> On Fri, Oct 13, 2023 at 11:56:31AM +0200, David Hildenbrand wrote:
> > Hi Peter,
>
> Hi, David,
>
> >
> > > I used to have the same thought with David on whether we can simplify the
> > > design to e.g. limit it to single mm. Then I found that t
On Thu, Oct 12, 2023 at 3:00 PM Peter Xu wrote:
>
> On Sun, Oct 08, 2023 at 11:42:27PM -0700, Suren Baghdasaryan wrote:
> > From: Andrea Arcangeli
> >
> > Implement the uABI of UFFDIO_MOVE ioctl.
> > UFFDIO_COPY performs ~20% better than UFFDIO_MOVE when the app
On Thu, Oct 19, 2023 at 12:53 PM Peter Xu wrote:
>
> On Thu, Oct 19, 2023 at 05:41:01PM +0200, David Hildenbrand wrote:
> > That's not my main point. It can easily become a maintenance burden without
> > any real use cases yet that we are willing to support.
>
> That's why I requested a few times
On Thu, Oct 12, 2023 at 3:29 PM Peter Xu wrote:
>
> On Sun, Oct 08, 2023 at 11:42:28PM -0700, Suren Baghdasaryan wrote:
> > Add a test for new UFFDIO_MOVE ioctl which uses uffd to move source
> > into destination buffer while checking the contents of both after
> > remapp
On Fri, Oct 13, 2023 at 1:04 AM David Hildenbrand wrote:
>
> On 13.10.23 00:01, Peter Xu wrote:
> > On Sun, Oct 08, 2023 at 11:42:26PM -0700, Suren Baghdasaryan wrote:
> >> From: Andrea Arcangeli
> >>
> >> For now, folio_move_anon_rmap() was only used to mo
On Mon, Oct 9, 2023 at 5:57 PM Lokesh Gidra wrote:
>
> On Mon, Oct 9, 2023 at 9:29 AM Lokesh Gidra wrote:
> >
> > On Mon, Oct 9, 2023 at 5:24 PM David Hildenbrand wrote:
> > >
> > > On 09.10.23 18:21, Suren Baghdasaryan wrote:
> > > >
On Mon, Oct 9, 2023 at 7:38 AM David Hildenbrand wrote:
>
> On 09.10.23 08:42, Suren Baghdasaryan wrote:
> > From: Andrea Arcangeli
> >
> > Implement the uABI of UFFDIO_MOVE ioctl.
> > UFFDIO_COPY performs ~20% better than UFFDIO_MOVE when the application
>
eroed.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 41 -
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm/uffd-unit-tests.c | 62
3 files changed, 102 insertions(+), 2 deletions(-)
diff --git a/
fork().
ENOMEM Allocating memory needed for the operation failed.
ESRCH
The faulting process has exited at the time of a
UFFDIO_MOVE operation.
Signed-off-by: Andrea Arcangeli
Signed-off-by: Suren Baghdasaryan
---
Documentation/admin-guide/mm/userfaultf
p: support move to different root anon_vma in
folio_move_anon_rmap()
userfaultfd: UFFDIO_MOVE uABI
Suren Baghdasaryan (1):
selftests/mm: add UFFDIO_MOVE ioctl test
Documentation/admin-guide/mm/userfaultfd.rst | 3 +
fs/userfaultfd.c | 63 ++
include/li
that folio_move_anon_rmap() must only be called if the anon page is
exclusive to a process, and must not be called on KSM folios.
This is a preparation for UFFDIO_MOVE, which will hold the folio lock,
the anon_vma lock in write mode, and the mmap_lock in read mode.
Signed-off-by: Andrea Arcangeli
Signed-off-by:
On Fri, Oct 6, 2023 at 5:30 AM David Hildenbrand wrote:
>
> On 04.10.23 01:39, Lokesh Gidra wrote:
> > On Tue, Oct 3, 2023 at 11:26 PM Suren Baghdasaryan
> > wrote:
> >>
> >> On Tue, Oct 3, 2023 at 2:21 PM Peter Xu wrote:
> >>>
> >>>
On Tue, Oct 3, 2023 at 2:21 PM Peter Xu wrote:
>
> On Tue, Oct 03, 2023 at 11:08:07PM +0200, David Hildenbrand wrote:
> > Sorry I have to ask: has this ever been discussed on the list? I don't see
> > any pointers. If not, then probably the number of people that know about the
> > history can be c
On Mon, Oct 2, 2023 at 12:34 PM Lokesh Gidra wrote:
>
> On Mon, Oct 2, 2023 at 6:43 PM David Hildenbrand wrote:
> >
> > On 02.10.23 17:55, Lokesh Gidra wrote:
> > > On Mon, Oct 2, 2023 at 4:46 PM Lokesh Gidra
> > > wrote:
> > >>
> > >> On Mon, Oct 2, 2023 at 4:21 PM Peter Xu wrote:
> > >>>
> >
On Mon, Oct 2, 2023 at 10:30 AM David Hildenbrand wrote:
>
> On 02.10.23 17:23, Peter Xu wrote:
> > On Mon, Oct 02, 2023 at 04:42:50PM +0200, David Hildenbrand wrote:
> >> On 23.09.23 03:31, Suren Baghdasaryan wrote:
> >>> From: Andrea Arcangeli
> >>&g
On Thu, Sep 28, 2023 at 11:32 AM Suren Baghdasaryan wrote:
>
> On Thu, Sep 28, 2023 at 10:15 AM David Hildenbrand wrote:
> >
> > On 27.09.23 20:25, Suren Baghdasaryan wrote:
> > >>
> > >> I have some cleanups pending for page_move_anon_rmap(), that move
On Thu, Sep 28, 2023 at 9:23 AM Peter Xu wrote:
>
> Suren,
>
> Sorry to review so late.
>
> On Fri, Sep 22, 2023 at 06:31:44PM -0700, Suren Baghdasaryan wrote:
> > diff --git a/mm/rmap.c b/mm/rmap.c
> > index ec7f8e6c9e48..c1ebbd23fa61 100644
> > --- a/mm/rmap
On Thu, Sep 28, 2023 at 11:43 AM Peter Xu wrote:
>
> One more thing..
>
> On Fri, Sep 22, 2023 at 06:31:45PM -0700, Suren Baghdasaryan wrote:
> > +static int remap_pages_pte(struct mm_struct *dst_mm,
>
> [...]
>
> > +retry:
> > + dst_pte = pte_offs
On Thu, Sep 28, 2023 at 11:34 AM Peter Xu wrote:
>
> On Thu, Sep 28, 2023 at 07:51:18PM +0200, David Hildenbrand wrote:
> > On 28.09.23 19:21, Peter Xu wrote:
> > > On Thu, Sep 28, 2023 at 07:05:40PM +0200, David Hildenbrand wrote:
> > > > As described as reply to v1, without fork() and KSM, the P
On Thu, Sep 28, 2023 at 10:15 AM David Hildenbrand wrote:
>
> On 27.09.23 20:25, Suren Baghdasaryan wrote:
> >>
> >> I have some cleanups pending for page_move_anon_rmap(), that moves the
> >> SetPageAnonExclusive hunk out. Here we should be using
>
On Thu, Sep 28, 2023 at 10:09 AM Peter Xu wrote:
>
> On Fri, Sep 22, 2023 at 06:31:45PM -0700, Suren Baghdasaryan wrote:
> > @@ -72,6 +73,7 @@
> > #define _UFFDIO_WAKE (0x02)
> > #define _UFFDIO_COPY (0x03)
> > #define _UFF
On Wed, Sep 27, 2023 at 3:49 PM Jann Horn wrote:
>
> On Wed, Sep 27, 2023 at 11:08 PM Suren Baghdasaryan wrote:
> > On Wed, Sep 27, 2023 at 1:42 PM Suren Baghdasaryan
> > wrote:
> > >
> > > On Wed, Sep 27, 2023 at 1:04 PM Jann Horn wrote:
> > > &g
On Wed, Sep 27, 2023 at 1:42 PM Suren Baghdasaryan wrote:
>
> On Wed, Sep 27, 2023 at 1:04 PM Jann Horn wrote:
> >
> > On Wed, Sep 27, 2023 at 8:08 PM Suren Baghdasaryan
> > wrote:
> > > On Wed, Sep 27, 2023 at 5:47 AM Jann Horn wrote:
> > &g
On Wed, Sep 27, 2023 at 1:04 PM Jann Horn wrote:
>
> On Wed, Sep 27, 2023 at 8:08 PM Suren Baghdasaryan wrote:
> > On Wed, Sep 27, 2023 at 5:47 AM Jann Horn wrote:
> > > On Sat, Sep 23, 2023 at 3:31 AM Suren Baghdasaryan
> > > wrote:
> > > > Fr
On Wed, Sep 27, 2023 at 6:29 AM David Hildenbrand wrote:
>
> >> +static int remap_anon_pte(struct mm_struct *dst_mm, struct mm_struct
> >> *src_mm,
> >> + struct vm_area_struct *dst_vma,
> >> + struct vm_area_struct *src_vma,
> >> +
On Wed, Sep 27, 2023 at 5:47 AM Jann Horn wrote:
>
> On Sat, Sep 23, 2023 at 3:31 AM Suren Baghdasaryan wrote:
> > From: Andrea Arcangeli
> >
> > This implements the uABI of UFFDIO_REMAP.
> >
> > Notably one mode bitflag is also forwarded (and in turn kn
On Wed, Sep 27, 2023 at 3:07 AM Jann Horn wrote:
>
> [moving Hugh into "To:" recipients as FYI for khugepaged interaction]
>
> On Sat, Sep 23, 2023 at 3:31 AM Suren Baghdasaryan wrote:
> > From: Andrea Arcangeli
> >
> > This implements the uABI of UFFDIO
int is an acceptable tradeoff for UFFDIO_REMAP
users.
The source addresses passed to UFFDIO_REMAP can be set as
VM_DONTCOPY with MADV_DONTFORK to avoid any risk of the mapcount of
the pages increasing if some thread of the process forks() before
UFFDIO_REMAP run.
Signed-off-by: Andrea Arcangeli
Signed-of
eroed.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 41 -
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm/uffd-unit-tests.c | 62
3 files changed, 102 insertions(+), 2 deletions(-)
diff --
From: Andrea Arcangeli
This implements the uABI of UFFDIO_REMAP.
Notably one mode bitflag is also forwarded (and in turn known) by the
lowlevel remap_pages method.
Signed-off-by: Andrea Arcangeli
Signed-off-by: Suren Baghdasaryan
---
Changes since v1:
- add mmget_not_zero in
serfaultfd: UFFDIO_REMAP: rmap preparation
userfaultfd: UFFDIO_REMAP uABI
Suren Baghdasaryan (1):
selftests/mm: add UFFDIO_REMAP ioctl test
fs/userfaultfd.c | 63 ++
include/linux/rmap.h | 5 +
include/linux/userfaultfd_k.h| 12
On Thu, Sep 21, 2023 at 11:17 AM David Hildenbrand wrote:
>
> On 21.09.23 20:04, Suren Baghdasaryan wrote:
> > On Thu, Sep 14, 2023 at 6:45 PM David Hildenbrand wrote:
> >>
> >> On 14.09.23 20:43, David Hildenbrand wrote:
> >>> On 14.09.23 20:11, Matthew
On Thu, Sep 14, 2023 at 6:45 PM David Hildenbrand wrote:
>
> On 14.09.23 20:43, David Hildenbrand wrote:
> > On 14.09.23 20:11, Matthew Wilcox wrote:
> >> On Thu, Sep 14, 2023 at 08:26:12AM -0700, Suren Baghdasaryan wrote:
> >>> +++ b/include/linux/userfaultfd_k.
On Tue, Sep 19, 2023 at 4:51 PM Jann Horn wrote:
>
> On Wed, Sep 20, 2023 at 1:08 AM Suren Baghdasaryan wrote:
> > On Thu, Sep 14, 2023 at 7:28 PM Jann Horn wrote:
> > > On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan
> > > wrote:
> > > > Fr
On Tue, Sep 19, 2023 at 4:08 PM Suren Baghdasaryan wrote:
>
> On Thu, Sep 14, 2023 at 7:28 PM Jann Horn wrote:
> >
> > On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan
> > wrote:
> > >
> > > From: Andrea Arcangeli
> > >
> > > This
On Thu, Sep 14, 2023 at 7:28 PM Jann Horn wrote:
>
> On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan wrote:
> >
> > From: Andrea Arcangeli
> >
> > This implements the uABI of UFFDIO_REMAP.
> >
> > Notably one mode bitflag is also forwarded (and in t
On Fri, Sep 15, 2023 at 4:34 PM Jann Horn wrote:
>
> On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan wrote:
> > +/*
> > + * The mmap_lock for reading is held by the caller. Just move the page
> > + * from src_pmd to dst_pmd if possible, and return true if succeeded
&g
On Fri, Sep 15, 2023 at 4:04 AM Nadav Amit wrote:
>
>
>
> > On Sep 14, 2023, at 8:28 PM, Suren Baghdasaryan wrote:
> >
> > On Thu, Sep 14, 2023 at 2:57 PM Nadav Amit wrote:
> >>
> >>
> >>> On Sep 14, 2023, at 8:26 AM, Suren Baghdasaryan
On Thu, Sep 14, 2023 at 2:57 PM Nadav Amit wrote:
>
>
> > On Sep 14, 2023, at 8:26 AM, Suren Baghdasaryan wrote:
> >
> > + if (!pte_same(ptep_clear_flush(src_vma, src_addr, src_pte),
> > + orig_src_pte))
> > + BUG_ON(1);
>
&g
On Thu, Sep 14, 2023 at 12:28 PM Jann Horn wrote:
>
> On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan wrote:
> >
> > From: Andrea Arcangeli
> >
> > This implements the uABI of UFFDIO_REMAP.
> >
> > Notably one mode bitflag is also forwarded (and in t
On Thu, Sep 14, 2023 at 11:47 AM David Hildenbrand wrote:
>
> On 14.09.23 17:26, Suren Baghdasaryan wrote:
> > From: Andrea Arcangeli
> >
> > This implements the uABI of UFFDIO_REMAP.
> >
> > Notably one mode bitflag is also forwarded (and in turn known) by
On Thu, Sep 14, 2023 at 10:56 AM Matthew Wilcox wrote:
>
> On Thu, Sep 14, 2023 at 08:26:11AM -0700, Suren Baghdasaryan wrote:
> > From: Andrea Arcangeli
> >
> > As far as the rmap code is concerned, UFFDIO_REMAP only alters the
> > page->mapping and page->
eroed.
Signed-off-by: Suren Baghdasaryan
---
tools/testing/selftests/mm/uffd-common.c | 34 ++-
tools/testing/selftests/mm/uffd-common.h | 1 +
tools/testing/selftests/mm/uffd-unit-tests.c | 62
3 files changed, 95 insertions(+), 2 deletions(-)
diff --git a/
int is an acceptable tradeoff for UFFDIO_REMAP
users.
The source addresses passed to UFFDIO_REMAP can be set as
VM_DONTCOPY with MADV_DONTFORK to avoid any risk of the mapcount of
the pages increasing if some thread of the process forks() before
UFFDIO_REMAP run.
Signed-off-by: Andrea Arcangeli
Signed-of
From: Andrea Arcangeli
This implements the uABI of UFFDIO_REMAP.
Notably one mode bitflag is also forwarded (and in turn known) by the
lowlevel remap_pages method.
Signed-off-by: Andrea Arcangeli
Signed-off-by: Suren Baghdasaryan
---
fs/userfaultfd.c | 49 +++
include/linux
1 - 100 of 101 matches
Mail list logo