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 | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c38350b2a2e1..a66c1318cab8 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); @@ -667,7 +668,16 @@ struct memcg_vmstats_percpu { /* Cgroup1: threshold notifications & softlimit tree updates */ unsigned long nr_page_events; unsigned long targets[MEM_CGROUP_NTARGETS]; -} ____cacheline_aligned; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) +}____cacheline_aligned;
struct memcg_vmstats { /* Aggregated (CPU and subtree) page state & events */ @@ -684,6 +694,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) };
/*