diff --git a/include/linux/sched.h b/include/linux/sched.h index 4b9d3c827368..82650a6fb544 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -849,9 +849,7 @@ struct task_struct { struct sched_rt_entity rt; struct sched_dl_entity dl; struct sched_dl_entity *dl_server; -#ifdef CONFIG_SCHED_CLASS_EXT struct sched_ext_entity scx; -#endif const struct sched_class *sched_class; #ifdef CONFIG_SCHED_CORE diff --git a/include/linux/sched/ext.h b/include/linux/sched/ext.h index 2799e7284fff..c9d52eb44021 100644 --- a/include/linux/sched/ext.h +++ b/include/linux/sched/ext.h @@ -9,7 +9,6 @@ #ifndef _LINUX_SCHED_EXT_H #define _LINUX_SCHED_EXT_H -#ifdef CONFIG_SCHED_CLASS_EXT #include #include @@ -196,12 +195,12 @@ struct sched_ext_entity { bool disallow; /* reject switching into SCX */ /* cold fields */ -#ifdef CONFIG_EXT_GROUP_SCHED struct cgroup *cgrp_moving_from; -#endif struct list_head tasks_node; }; +#ifdef CONFIG_SCHED_CLASS_EXT + void sched_ext_free(struct task_struct *p); void print_scx_info(const char *log_lvl, struct task_struct *p); diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index c0751dcb7f52..51459688fee1 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -469,10 +469,8 @@ struct task_group { struct rt_bandwidth rt_bandwidth; #endif -#ifdef CONFIG_EXT_GROUP_SCHED u32 scx_flags; /* SCX_TG_* */ u32 scx_weight; -#endif struct rcu_head rcu; struct list_head list; @@ -755,7 +753,6 @@ struct cfs_rq { #endif /* CONFIG_FAIR_GROUP_SCHED */ }; -#ifdef CONFIG_SCHED_CLASS_EXT /* scx_rq->flags, protected by the rq lock */ enum scx_rq_flags { /* @@ -792,7 +789,6 @@ struct scx_rq { struct irq_work deferred_irq_work; struct irq_work kick_cpus_irq_work; }; -#endif /* CONFIG_SCHED_CLASS_EXT */ static inline int rt_bandwidth_enabled(void) { @@ -1152,9 +1148,7 @@ struct rq { struct cfs_rq cfs; struct rt_rq rt; struct dl_rq dl; -#ifdef CONFIG_SCHED_CLASS_EXT struct scx_rq scx; -#endif struct sched_dl_entity fair_server;