hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9RPY4
--------------------------------
We reserve some fields beforehand for memcg_vmstats_percpu related structures prone to change, therefore, we can hot add/change features of memcg_vmstats_percpu with this enhancement.
Signed-off-by: Lu Jialin lujialin4@huawei.com --- mm/memcontrol.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index a4a331ed1446..15d7885b3981 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -83,6 +83,7 @@
#include <trace/events/vmscan.h> #include <linux/ksm.h> +#include <linux/kabi.h>
struct cgroup_subsys memory_cgrp_subsys __read_mostly; EXPORT_SYMBOL(memory_cgrp_subsys); @@ -661,6 +662,14 @@ struct memcg_vmstats_percpu {
/* Stats updates since the last flush */ unsigned int stats_updates; + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
struct memcg_vmstats { @@ -678,6 +687,14 @@ struct memcg_vmstats {
/* Stats updates since the last flush */ atomic64_t stats_updates; + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
/*