
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IC97W5 -------------------------------- Add a config for ucounts. which provice percpu_counter to have a better scalability. Signed-off-by: Chen Ridong <chenridong@huawei.com> --- arch/arm64/configs/openeuler_defconfig | 1 + arch/x86/configs/openeuler_defconfig | 1 + init/Kconfig | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index 3f9be66edece9..1b987444a8d89 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -196,6 +196,7 @@ CONFIG_SOCK_CGROUP_DATA=y CONFIG_CGROUP_V1_KILL=y CONFIG_CGROUP_V1_STAT=y CONFIG_CGROUP_FILES=y +CONFIG_UCOUNTS_PERCPU_COUNTER=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_TIME_NS=y diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig index 49fc7487fb021..d8d0737b19f35 100644 --- a/arch/x86/configs/openeuler_defconfig +++ b/arch/x86/configs/openeuler_defconfig @@ -214,6 +214,7 @@ CONFIG_SOCK_CGROUP_DATA=y CONFIG_CGROUP_V1_KILL=y CONFIG_CGROUP_V1_STAT=y CONFIG_CGROUP_FILES=y +CONFIG_UCOUNTS_PERCPU_COUNTER=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_TIME_NS=y diff --git a/init/Kconfig b/init/Kconfig index 4c566c4bbfa49..4fa5064c0b4c0 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1343,6 +1343,15 @@ config CGROUP_FILES endif # CGROUPS +config UCOUNTS_PERCPU_COUNTER + bool "Ucount percpu counter for rlimit" + default n + help + Provide percpu_counter for ucounts, which can improve scalability + for rlimit counting. Opening this config will re-inplement rlimit + charging or uncharging using percpu_counter, avoiding atomic + operations on the common parents. + menuconfig NAMESPACES bool "Namespaces support" if EXPERT depends on MULTIUSER -- 2.34.1