提交 7ef131ba 编写于 作者: L Lu Jialin 提交者: Zheng Zengkai

kabi: reserve space for cpu cgroup and cpuset cgroup related structures

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4GII8?from=project-issue
CVE: NA

--------

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: NLu Jialin <lujialin4@huawei.com>
Reviewed-by: NChen Hui <judy.chenhui@huawei.com>
Reviewed-by: Nweiyang wang <wangweiyang2@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 283fde80
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/cgroup.h> #include <linux/cgroup.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/kabi.h>
DEFINE_STATIC_KEY_FALSE(cpusets_pre_enable_key); DEFINE_STATIC_KEY_FALSE(cpusets_pre_enable_key);
DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key); DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key);
...@@ -160,6 +161,11 @@ struct cpuset { ...@@ -160,6 +161,11 @@ struct cpuset {
*/ */
int use_parent_ecpus; int use_parent_ecpus;
int child_ecpus_count; int child_ecpus_count;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
/* /*
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/task_work.h> #include <linux/task_work.h>
#include <linux/tsacct_kern.h> #include <linux/tsacct_kern.h>
#include <linux/kabi.h>
#include <asm/tlb.h> #include <asm/tlb.h>
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
...@@ -440,6 +441,10 @@ struct task_group { ...@@ -440,6 +441,10 @@ struct task_group {
struct uclamp_se uclamp[UCLAMP_CNT]; struct uclamp_se uclamp[UCLAMP_CNT];
#endif #endif
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
#ifdef CONFIG_FAIR_GROUP_SCHED #ifdef CONFIG_FAIR_GROUP_SCHED
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册