From: Lu Jialin lujialin4@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8SWPP
---------------------------------------------
We reserve some fields beforehand for cpu cgroup and cpuset related structures prone to change, therefore, we can hot add/change features of cpu cgroup cpuset and cgroup with this enhancement.
After reserving, normally cache does not matter as the reserved fields are not accessed at all.
Signed-off-by: Lu Jialin lujialin4@huawei.com Signed-off-by: Xiang Yang xiangyang3@huawei.com --- kernel/cgroup/cpuset.c | 6 ++++++ kernel/sched/sched.h | 6 ++++++ 2 files changed, 12 insertions(+)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index cfdca8aeabda..ea78008dd899 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -43,6 +43,7 @@ #include <linux/sched/isolation.h> #include <linux/cgroup.h> #include <linux/wait.h> +#include <linux/kabi.h>
DEFINE_STATIC_KEY_FALSE(cpusets_pre_enable_key); DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key); @@ -186,6 +187,11 @@ struct cpuset {
/* Handle for cpuset.cpus.partition */ struct cgroup_file partition_file; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 88dbcbe3d7c1..938d4d6cc6f2 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -68,6 +68,7 @@ #include <linux/wait_api.h> #include <linux/wait_bit.h> #include <linux/workqueue_api.h> +#include <linux/kabi.h>
#include <trace/events/power.h> #include <trace/events/sched.h> @@ -455,6 +456,11 @@ struct task_group { #if defined(CONFIG_QOS_SCHED_SMART_GRID) && !defined(__GENKSYMS__) struct auto_affinity *auto_affinity; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#ifdef CONFIG_FAIR_GROUP_SCHED