Skip to content

Commit ebaeab2

Browse files
changbindutorvalds
authored andcommitted
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/[email protected] Signed-off-by: Changbin Du <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d09c387 commit ebaeab2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/vm/page-types.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ int main(int argc, char *argv[])
13311331
if (opt_list && opt_list_mapcnt)
13321332
kpagecount_fd = checked_open(PROC_KPAGECOUNT, O_RDONLY);
13331333

1334-
if (opt_mark_idle && opt_file)
1334+
if (opt_mark_idle)
13351335
page_idle_fd = checked_open(SYS_KERNEL_MM_PAGE_IDLE, O_RDWR);
13361336

13371337
if (opt_list && opt_pid)

0 commit comments

Comments
 (0)