Commit 7a35fa06 authored by He Yujie's avatar He Yujie
Browse files

rseq/mm_cid: change the mm_cid macro default status and keep KABI consistent

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB1OJX



--------------------------------

Changing the mm_cid macro to disable status by modifying
Kconfig: def_bool n, and reserving the field for task_struct
and mm_struct by using  KABI_REPLACE to keep
KABI consistent.

Fixes: af7f588d ("sched: Introduce per-memory-map concurrency ID")
Signed-off-by: default avatarHe Yujie <coka.heyujie@huawei.com>
parent 60cefc8d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_QOS_SCHED_DYNAMIC_AFFINITY=y
CONFIG_SCHED_MM_CID=y
# CONFIG_SCHED_MM_CID is not set
CONFIG_QOS_SCHED_SMART_GRID=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_RDMA=y
+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_QOS_SCHED_DYNAMIC_AFFINITY=y
CONFIG_SCHED_MM_CID=y
# CONFIG_SCHED_MM_CID is not set
# CONFIG_QOS_SCHED_SMART_GRID is not set
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_RDMA=y
+4 −2
Original line number Diff line number Diff line
@@ -711,12 +711,10 @@ struct vm_area_struct {
	KABI_RESERVE(4)
} __randomize_layout;

#ifdef CONFIG_SCHED_MM_CID
struct mm_cid {
	u64 time;
	int cid;
};
#endif

struct kioctx_table;
struct iommu_mm_data;
@@ -789,6 +787,10 @@ struct mm_struct {
		 * When the next mm_cid scan is due (in jiffies).
		 */
		unsigned long mm_cid_next_scan;
#else
		KABI_REPLACE(struct mm_cid __percpu *pcpu_cid,
				struct mm_cid __percpu *pcpu_cid)
		KABI_REPLACE(unsigned long mm_cid_next_scan, unsigned long mm_cid_next_scan)
#endif
#ifdef CONFIG_MMU
		atomic_long_t pgtables_bytes;	/* size of all page tables */
+7 −0
Original line number Diff line number Diff line
@@ -1355,6 +1355,13 @@ struct task_struct {
	int				migrate_from_cpu;
	int				mm_cid_active;	/* Whether cid bitmap is active */
	struct callback_head		cid_work;
#else
	KABI_REPLACE(int mm_cid, int mm_cid)
	KABI_REPLACE(int last_mm_cid, int last_mm_cid)
	KABI_REPLACE(int migrate_from_cpu, int migrate_from_cpu)
	KABI_REPLACE(int mm_cid_active, int mm_cid_active)
	KABI_REPLACE(struct callback_head cid_work,
			struct callback_head cid_work)
#endif

	struct tlbflush_unmap_batch	tlb_ubc;
+1 −1
Original line number Diff line number Diff line
@@ -1137,7 +1137,7 @@ config QOS_SCHED_DYNAMIC_AFFINITY
	 cpus allowed.

config SCHED_MM_CID
	def_bool y
	def_bool n
	depends on SMP && RSEQ

config UCLAMP_TASK_GROUP