On Fri, Jun 3, 2022 at 5:40 PM Zach O'Keefe <zokeefe@xxxxxxxxxx> wrote: > > Tools able to translate MADV_COLLAPSE advice to human readable string: > > $ tools/perf/trace/beauty/madvise_behavior.sh > static const char *madvise_advices[] = { > [0] = "NORMAL", > [1] = "RANDOM", > [2] = "SEQUENTIAL", > [3] = "WILLNEED", > [4] = "DONTNEED", > [8] = "FREE", > [9] = "REMOVE", > [10] = "DONTFORK", > [11] = "DOFORK", > [12] = "MERGEABLE", > [13] = "UNMERGEABLE", > [14] = "HUGEPAGE", > [15] = "NOHUGEPAGE", > [16] = "DONTDUMP", > [17] = "DODUMP", > [18] = "WIPEONFORK", > [19] = "KEEPONFORK", > [20] = "COLD", > [21] = "PAGEOUT", > [22] = "POPULATE_READ", > [23] = "POPULATE_WRITE", > [24] = "DONTNEED_LOCKED", > [25] = "COLLAPSE", > [100] = "HWPOISON", > [101] = "SOFT_OFFLINE", > }; > > Signed-off-by: Zach O'Keefe <zokeefe@xxxxxxxxxx> > --- > tools/include/uapi/asm-generic/mman-common.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/include/uapi/asm-generic/mman-common.h b/tools/include/uapi/asm-generic/mman-common.h > index 6c1aa92a92e4..6ce1f1ceb432 100644 > --- a/tools/include/uapi/asm-generic/mman-common.h > +++ b/tools/include/uapi/asm-generic/mman-common.h > @@ -77,6 +77,8 @@ > > #define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */ > > +#define MADV_COLLAPSE 25 /* Synchronous hugepage collapse */ I think this patch could be squashed into patch #9? > + > /* compatibility flags */ > #define MAP_FILE 0 > > -- > 2.36.1.255.ge46751e96f-goog >