From 85d90acbce4c397e48fc215706b180fb0dad0090 Mon Sep 17 00:00:00 2001 From: yu kuai Date: Wed, 29 Nov 2023 18:47:35 +0800 Subject: [PATCH] fs/dirty_pages: introduce a new config option 'CONFIG_DIRTY_PAGES' hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8KE0Z?from=project-issue --------------------------- The new config option 'CONFIG_DIRTY_PAGES' can control whether to configure the feather or not. Signed-off-by: yu kuai Signed-off-by: Zizhi Wo (cherry picked from commit 248e21394d886543c73426abc1d81f2bf7fa7519) --- arch/arm64/configs/openeuler_defconfig | 1 + arch/x86/configs/openeuler_defconfig | 1 + fs/Kconfig | 13 +++++++++++++ fs/Makefile | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index e82181af14d6b..684e91a230377 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -6347,6 +6347,7 @@ CONFIG_PROC_PAGE_MONITOR=y CONFIG_PROC_CHILDREN=y CONFIG_KERNFS=y CONFIG_SYSFS=y +CONFIG_DIRTY_PAGES=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig index ebe4fb56da524..663e87157b2e5 100644 --- a/arch/x86/configs/openeuler_defconfig +++ b/arch/x86/configs/openeuler_defconfig @@ -7437,6 +7437,7 @@ CONFIG_PROC_PID_ARCH_STATUS=y CONFIG_PROC_CPU_RESCTRL=y CONFIG_KERNFS=y CONFIG_SYSFS=y +CONFIG_DIRTY_PAGES=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y diff --git a/fs/Kconfig b/fs/Kconfig index 385602ba0d995..d3fff13ca13dd 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -156,6 +156,19 @@ source "fs/proc/Kconfig" source "fs/kernfs/Kconfig" source "fs/sysfs/Kconfig" +config DIRTY_PAGES + bool "Dumps the number of dirty pages of each file" + depends on PROC_FS + default y + help + This config supports the rendering of dirty page data to the user, + which may be useful to analyze the IO performance when using buffer + IO. + + It create 3 interfaces by using procfs. /proc/dirty/buffer_size for + buffer allocation and release; /proc/dirty/page_threshold to filter + result; /proc/dirty/dirty_list to get dirty pages. + config TMPFS bool "Tmpfs virtual memory file system support (former shm fs)" depends on SHMEM diff --git a/fs/Makefile b/fs/Makefile index 720fccc8bffa3..2a756dda52e56 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -50,7 +50,7 @@ obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o obj-$(CONFIG_NFS_COMMON) += nfs_common/ obj-$(CONFIG_COREDUMP) += coredump.o obj-$(CONFIG_SYSCTL) += drop_caches.o -obj-$(CONFIG_SYSCTL) += dirty_pages.o +obj-$(CONFIG_DIRTY_PAGES) += dirty_pages.o obj-$(CONFIG_FHANDLE) += fhandle.o obj-$(CONFIG_CGROUP_FILES) += filescontrol.o -- Gitee