tools headers UAPI: Sync asm-generic/mman-common.h with the kernel
PATCH 1/1 tools headers UAPI: Sync asm-generic/mman-common.h with the kernel
Just FYI: I'm carrying this patch on the perf tools tree.
- Arnaldo
---
To pick the changes from:
9457056ac426e5ed ("mm: madvise: MADV_DONTNEED_LOCKED")
That result in these changes in the tools:
$ diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h --- tools/include/uapi/asm-generic/mman-common.h 2022-03-29 16:17:50.461694991 -0300 +++ include/uapi/asm-generic/mman-common.h 2022-03-27 19:12:48.923250468 -0300 @@ -75,6 +75,8 @@ #define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */ #define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */
+#define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */ + /* compatibility flags */ #define MAP_FILE 0
$ tools/perf/trace/beauty/madvise_behavior.sh > before $ cp include/uapi/asm-generic/mman-common.h tools/include/uapi/asm-generic/mman-common.h $ tools/perf/trace/beauty/madvise_behavior.sh > after $ diff -u before after --- before 2022-03-29 16:18:04.091044244 -0300 +++ after 2022-03-29 16:18:11.692238906 -0300 @@ -20,6 +20,7 @@ [21] = "PAGEOUT", [22] = "POPULATE_READ", [23] = "POPULATE_WRITE", + [24] = "DONTNEED_LOCKED", [100] = "HWPOISON", [101] = "SOFT_OFFLINE", }; $
I.e. now when madvise gets those behaviours as args, 'perf trace' will be able to translate from the number to a human readable string and to use the strings in tracepoint filter expressions.
This addresses the following perf build warning:
Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h' diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h
Cc Johannes Weiner <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/include/uapi/asm-generic/mman-common.h | 2 ++ 1 file changed, 2 insertions(+)
tools/include/uapi/asm-generic/mman-common.h +2 -0
@@ -75,6 +75,8 @@#define MADV_POPULATE_READ 22/* populate (prefault) page tables readable */ #define MADV_POPULATE_WRITE 23/* populate (prefault) page tables writable */ +#define MADV_DONTNEED_LOCKED 24/* like DONTNEED, but drop locked pages too */ +/* compatibility flags */ #define MAP_FILE 0
Signature · 1 line
2.35.1