Commit 85ff95ab authored by Lu Jialin's avatar Lu Jialin Committed by Xiang Yang
Browse files

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

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: default avatarLu Jialin <lujialin4@huawei.com>
Signed-off-by: default avatarXiang Yang <xiangyang3@huawei.com>
parent 34a4a473
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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)
};

/*
+10 −0
Original line number Diff line number Diff line
@@ -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,15 @@ 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)
	KABI_RESERVE(5)
	KABI_RESERVE(6)
	KABI_RESERVE(7)
	KABI_RESERVE(8)
};

#ifdef CONFIG_FAIR_GROUP_SCHED