hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IDC9YK -------------------------------- sched_ext: Fix kabi for struct sched_ext_entity scx in struct task_struct. Fixes: 7240343fcc6f ("sched_ext: Implement BPF extensible scheduler class") Signed-off-by: Zicheng Qu <quzicheng@huawei.com> --- include/linux/sched.h | 7 ++++--- kernel/sched/sched.h | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 4dae4e677bb8..ea055cebc985 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -842,9 +842,6 @@ struct task_struct { struct sched_entity se; struct sched_rt_entity rt; struct sched_dl_entity dl; -#ifdef CONFIG_SCHED_CLASS_EXT - struct sched_ext_entity scx; -#endif const struct sched_class *sched_class; #ifdef CONFIG_SCHED_CORE @@ -1649,6 +1646,10 @@ struct task_struct { KABI_RESERVE(16) KABI_AUX_PTR(task_struct) +#if !defined(__GENKSYMS__) && defined(CONFIG_SCHED_CLASS_EXT) + KABI_BROKEN_INSERT(struct sched_ext_entity scx) +#endif + /* CPU-specific state of this task: */ struct thread_struct thread; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index fa00126f5561..ae482db5a30a 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1186,9 +1186,6 @@ struct rq { #ifdef CONFIG_SCHED_STEAL struct sparsemask *cfs_overload_cpus; #endif -#ifdef CONFIG_SCHED_CLASS_EXT - struct scx_rq scx; -#endif #ifdef CONFIG_FAIR_GROUP_SCHED /* list of leaf cfs_rq on this CPU: */ @@ -1379,6 +1376,9 @@ struct rq { KABI_RESERVE(6) KABI_RESERVE(7) KABI_RESERVE(8) +#if defined(CONFIG_SCHED_CLASS_EXT) + KABI_EXTEND(struct scx_rq scx) +#endif }; #ifdef CONFIG_FAIR_GROUP_SCHED -- 2.34.1