Offering: HULK 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: af7f588d8f73 ("sched: Introduce per-memory-map concurrency ID") Signed-off-by: He Yujie coka.heyujie@huawei.com --- arch/arm64/configs/openeuler_defconfig | 2 +- arch/x86/configs/openeuler_defconfig | 2 +- include/linux/mm_types.h | 6 ++++-- include/linux/sched.h | 7 +++++++ init/Kconfig | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index 96ca8b990e22..67d02760f856 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -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 diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig index d95d966f7fb2..ea83b730a3be 100644 --- a/arch/x86/configs/openeuler_defconfig +++ b/arch/x86/configs/openeuler_defconfig @@ -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 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 793c16b99237..fdc047bdbc49 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -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 */ diff --git a/include/linux/sched.h b/include/linux/sched.h index f40411aa7b70..7b1c53f71ee4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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; diff --git a/init/Kconfig b/init/Kconfig index 6ea4eafecab1..2d6ae58a5bf7 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -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
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/12939 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/L...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/12939 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/L...