Thread (30 messages) 30 messages, 7 authors, 2025-11-19

Re: [PATCH v3 3/8] mm: implement sticky VMA flags

From: Lorenzo Stoakes <hidden>
Date: 2025-11-18 07:47:48
Also in: linux-fsdevel, linux-kselftest, linux-mm, linux-trace-kernel, lkml

On Mon, Nov 17, 2025 at 02:43:32PM -0800, Andrew Morton wrote:
quoted hunk ↗ jump to hunk
On Mon, 17 Nov 2025 20:02:03 +0000 Lorenzo Stoakes [off-list ref] wrote:
quoted
Sorry to be a pain here, and can respin if it's easier, but can we update the
text of the comments below? As in discussion with Liam off-list we agreed that
the current wording is rather unclear and we can do a lot better.

I provide the improved version inline below:
np,

 include/linux/mm.h               |    7 +++----
 tools/testing/vma/vma_internal.h |    7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)
--- a/include/linux/mm.h~mm-implement-sticky-vma-flags-fix-2
+++ a/include/linux/mm.h
@@ -549,10 +549,9 @@ extern unsigned int kobjsize(const void
  *                pressure on the memory system forcing the kernel to generate
  *                new VMAs when old one could be extended instead.
  *
- *    VM_STICKY - If one VMA has flags which most be 'sticky', that is ones
- *                which should propagate to all VMAs, but the other does not,
- *                the merge should still proceed with the merge logic applying
- *                sticky flags to the final VMA.
+ *    VM_STICKY - When merging VMAs, VMA flags must match, unless they are
+ *                'sticky'. If any sticky flags exist in either VMA, we simply
+ *                set all of them on the merged VMA.
  */
 #define VM_IGNORE_MERGE (VM_SOFTDIRTY | VM_STICKY)

--- a/tools/testing/vma/vma_internal.h~mm-implement-sticky-vma-flags-fix-2
+++ a/tools/testing/vma/vma_internal.h
@@ -139,10 +139,9 @@ extern unsigned long dac_mmap_min_addr;
  *                pressure on the memory system forcing the kernel to generate
  *                new VMAs when old one could be extended instead.
  *
- *    VM_STICKY - If one VMA has flags which most be 'sticky', that is ones
- *                which should propagate to all VMAs, but the other does not,
- *                the merge should still proceed with the merge logic applying
- *                sticky flags to the final VMA.
+ *    VM_STICKY - When merging VMAs, VMA flags must match, unless they are
+ *                'sticky'. If any sticky flags exist in either VMA, we simply
+ *                set all of them on the merged VMA.
  */
 #define VM_IGNORE_MERGE (VM_SOFTDIRTY | VM_STICKY)
_
Thanks, much appreciated!

Despite your having very kindly done this, I apologise as I realise now after
all I have to respin... doh!

There was yet another typo as pointed out by Jane (and previously off-list,
Liam) plus Pedro (off-list) mentioned a silly mistake in my code fixup, and at
this point I think it'll keep us all a lot saner to just respin :>)

Cheers, Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help