summaryrefslogtreecommitdiffstats
path: root/tools/vm
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2021-09-24 15:43:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-24 16:13:35 -0700
commitebaeab2fe87987cef28eb5ab174c42cd28594387 (patch)
tree0c34660f43f0b06d9f39bc1137c2471ddd66247b /tools/vm
parentd09c38726c78effaf910a1e3f31e247b5b031d56 (diff)
downloadlinux-ebaeab2fe87987cef28eb5ab174c42cd28594387.tar.gz
linux-ebaeab2fe87987cef28eb5ab174c42cd28594387.tar.bz2
linux-ebaeab2fe87987cef28eb5ab174c42cd28594387.zip
tools/vm/page-types: remove dependency on opt_file for idle page tracking
Idle page tracking can also be used for process address space, not only file mappings. Without this change, using with '-i' option for process address space encounters below errors reported. $ sudo ./page-types -p $(pidof bash) -i mark page idle: Bad file descriptor mark page idle: Bad file descriptor mark page idle: Bad file descriptor mark page idle: Bad file descriptor ... Link: https://lkml.kernel.org/r/20210917032826.10669-1-changbin.du@gmail.com Signed-off-by: Changbin Du <changbin.du@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/vm')
-rw-r--r--tools/vm/page-types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/vm/page-types.c b/tools/vm/page-types.c
index 0517c744b04e..f62f10c988db 100644
--- a/tools/vm/page-types.c
+++ b/tools/vm/page-types.c
@@ -1331,7 +1331,7 @@ int main(int argc, char *argv[])
if (opt_list && opt_list_mapcnt)
kpagecount_fd = checked_open(PROC_KPAGECOUNT, O_RDONLY);
- if (opt_mark_idle && opt_file)
+ if (opt_mark_idle)
page_idle_fd = checked_open(SYS_KERNEL_MM_PAGE_IDLE, O_RDWR);
if (opt_list && opt_pid)