ot, as I've seen a patch of
> yous for the kernel, right?
>
> Thanks,
>
> Alex
>
> On 3/23/21 7:25 PM, Brian Geffon wrote:
> > mremap(2) now supports MREMAP_DONTUNMAP with mapping types other
> > than private anonymous.
> >
> > Signed-off-by: Brian G
mremap(2) now supports MREMAP_DONTUNMAP with mapping types other
than private anonymous.
Signed-off-by: Brian Geffon
---
man2/mremap.2 | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/man2/mremap.2 b/man2/mremap.2
index 3ed0c0c0a..72acbc111 100644
--- a/man2
This test extends the current mremap tests to validate that
the MREMAP_DONTUNMAP operation can be performed on shmem mappings.
Signed-off-by: Brian Geffon
---
tools/testing/selftests/vm/mremap_dontunmap.c | 52 +++
1 file changed, 52 insertions(+)
diff --git a/tools/testing
ve since expanded support of MREMAP_DONTUNMAP to non-anonymous
mappings, and these special mappings are still protected by the existing
check of !VM_DONTEXPAND and !VM_PFNMAP which will result in a -EINVAL.
1. https://lkml.org/lkml/2020/12/28/2340
Signed-off-by: Brian Geffon
Acked-by: Hugh Dickins
---
]
https://lore.kernel.org/linux-mm/20210302000133.272579-1-axelrasmus...@google.com/
Signed-off-by: Brian Geffon
Acked-by: Hugh Dickins
Tested-by: Lokesh Gidra
---
mm/mremap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/mremap.c b/mm/mremap.c
index ec8f840399ed..db
mremap(2) now supports MREMAP_DONTUNMAP with mapping types other
than private anonymous.
Signed-off-by: Brian Geffon
---
man2/mremap.2 | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/man2/mremap.2 b/man2/mremap.2
index 3ed0c0c0a..72acbc111 100644
--- a/man2
]
https://lore.kernel.org/linux-mm/20210302000133.272579-1-axelrasmus...@google.com/
Signed-off-by: Brian Geffon
Acked-by: Hugh Dickins
Tested-by: Lokesh Gidra
---
mm/mremap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/mremap.c b/mm/mremap.c
index ec8f840399ed..db
This test extends the current mremap tests to validate that
the MREMAP_DONTUNMAP operation can be performed on shmem mappings.
Signed-off-by: Brian Geffon
---
tools/testing/selftests/vm/mremap_dontunmap.c | 52 +++
1 file changed, 52 insertions(+)
diff --git a/tools/testing
ve since expanded support of MREMAP_DONTUNMAP to non-anonymous
mappings, and these special mappings are still protected by the existing
check of !VM_DONTEXPAND and !VM_PFNMAP which will result in a -EFAULT.
1. https://lkml.org/lkml/2020/12/28/2340
Signed-off-by: Brian Geffon
Acked-by: Hugh Dickins
---
ve since expanded support of MREMAP_DONTUNMAP to non-anonymous
mappings, and these special mappings are still protected by the existing
check of !VM_DONTEXPAND and !VM_PFNMAP which will result in a -EFAULT.
1. https://lkml.org/lkml/2020/12/28/2340
Signed-off-by: Brian Geffon
---
arch/x86/kernel/cpu
, this
patch will enable using UFFDIO_CONTINUE for the new userfaultfd-based heap
compaction."
[1]
https://lore.kernel.org/linux-mm/20201215030730.nc3cu98e4%25a...@linux-foundation.org/
[2]
https://lore.kernel.org/linux-mm/20210302000133.272579-1-axelrasmus...@google.com/
Signed-off-by: Brian Geffon
You're 100% correct, I'll mail a new patch in a few
Brian
On Wed, Mar 17, 2021 at 5:19 PM Peter Xu wrote:
>
> On Wed, Mar 17, 2021 at 04:44:25PM -0400, Brian Geffon wrote:
> > Hi Peter,
>
> Hi, Brian,
>
> > Thank you as always for taking a look. This chang
PM Peter Xu wrote:
>
> Hi, Brian,
>
> On Wed, Mar 17, 2021 at 12:13:33PM -0700, Brian Geffon wrote:
> > Currently MREMAP_DONTUNMAP only accepts private anonymous mappings. This
> > change will widen the support to include any mappings which are not
> > VM_DONTEXPAND
ve since expanded support of MREMAP_DONTUNMAP to non-anonymous
mappings, and these special mappings are still protected by the existing
check of !VM_DONTEXPAND and !VM_PFNMAP which will result in a -EFAULT.
1. https://lkml.org/lkml/2020/12/28/2340
Signed-off-by: Brian Geffon
---
arch/x86/kernel/cpu
201215030730.nc3cu98e4%25a...@linux-foundation.org/
[2]
https://lore.kernel.org/linux-mm/20210302000133.272579-1-axelrasmus...@google.com/
Signed-off-by: Brian Geffon
---
mm/mremap.c | 4
1 file changed, 4 deletions(-)
diff --git a/mm/mremap.c b/mm/mremap.c
index ec8f840399ed..2c57dc4bc8b
Hi Hugh,
Thanks for this suggestion, responses in line.
> A better patch would say:
>
> - if (flags & MREMAP_DONTUNMAP && (!vma_is_anonymous(vma) ||
> - vma->vm_flags & VM_SHARED))
> + if ((flags & MREMAP_DONTUNMAP) &&
> + (vma->vm_flags & (VM_DONTEXPAND
a read is performed without EFD_NONBLOCK it will block until a write
occurs. In both cases after the read completes successfully the
internal value is reset to 0. When polling with POLLIN, upon return
of a POLLIN event the internal value will be reset to 0.
Signed-off-by: Brian G
I apologize, this patch didn't include my signed off by, here it is:
Signed-off-by: Brian Geffon
On Wed, Mar 3, 2021 at 9:53 AM Brian Geffon wrote:
>
> Currently MREMAP_DONTUNMAP only accepts private anonymous mappings. This
> change
> will widen the support to include sh
Currently MREMAP_DONTUNMAP only accepts private anonymous mappings. This change
will widen the support to include shmem mappings. The primary use case
is to support MREMAP_DONTUNMAP on mappings which may have been created from
a memfd.
Lokesh Gidra who works on the Android JVM, provided an explana
Ah, you're right. This individual patch looks good to me.
Brian
On Mon, Dec 28, 2020 at 11:12 AM Dmitry Safonov wrote:
>
> On 12/28/20 6:21 PM, Brian Geffon wrote:
> > This looks good to me with a small comment.
> >
> >> if (do_munmap(mm,
This looks good to me with a small comment.
> if (do_munmap(mm, old_addr, old_len, uf_unmap) < 0) {
> /* OOM: unable to split vma, just get accounts right */
> - if (vm_flags & VM_ACCOUNT)
> + if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNM
I don't think this situation can ever happen MREMAP_DONTUNMAP is
already restricted to anonymous mappings (defined as not having
vm_ops) and vma_to_resize checks that the mapping is anonymous before
move_vma is called.
On Mon, Oct 12, 2020 at 6:34 PM Dmitry Safonov wrote:
>
> As kernel expect t
> > - mremap_userfaultfd_complete(&uf, addr, new_addr, old_len);
> > + mremap_userfaultfd_complete(&uf, addr, ret, old_len);
>
> Not super familiar with this code, but thought I'd ask, does ret
> to be checked for -ENOMEM before calling mremap_userfaultfd_complete?
> Sorry if I missed s
6, 2020 at 10:28 AM Joel Fernandes wrote:
>
> On Wed, May 6, 2020 at 1:22 PM Brian Geffon wrote:
> >
> > A user is not required to set a new address when using
> > MREMAP_DONTUNMAP as it can be used without MREMAP_FIXED.
> > When doing so the remap event will use
e new address it's probably more
correct to use it rather than new_addr on the remap_event_complete
call, and it resolves this bug.
Signed-off-by: Brian Geffon
---
mm/mremap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mremap.c b/mm/mremap.c
index c881abeba0bf..6a
To expand on the ChromeOS use case we're in a very similar situation
to Android. For example, the Chrome browser uses a separate process
for each individual tab (with some exceptions) and over time many tabs
remain open in a back-grounded or idle state. Given that we have a lot
of information about
26 matches
Mail list logo