mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 13:30:45 -05:00
sched_ext: Move internal type and accessor definitions to ext_internal.h
There currently isn't a place to place SCX-internal types and accessors to be shared between ext.c and ext_idle.c. Create kernel/sched/ext_internal.h and move internal type and accessor definitions there. This trims ext.c a bit and makes future additions easier. Pure code reorganization. No functional changes. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Andrea Righi <arighi@nvidia.com>
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
#include "deadline.c"
|
||||
|
||||
#ifdef CONFIG_SCHED_CLASS_EXT
|
||||
# include "ext_internal.h"
|
||||
# include "ext.c"
|
||||
# include "ext_idle.c"
|
||||
#endif
|
||||
|
||||
1034
kernel/sched/ext.c
1034
kernel/sched/ext.c
File diff suppressed because it is too large
Load Diff
@@ -8,29 +8,6 @@
|
||||
*/
|
||||
#ifdef CONFIG_SCHED_CLASS_EXT
|
||||
|
||||
static inline bool scx_kf_allowed_if_unlocked(void)
|
||||
{
|
||||
return !current->scx.kf_mask;
|
||||
}
|
||||
|
||||
static inline bool scx_rq_bypassing(struct rq *rq)
|
||||
{
|
||||
return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
|
||||
}
|
||||
|
||||
DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup);
|
||||
|
||||
DECLARE_PER_CPU(struct rq *, scx_locked_rq_state);
|
||||
|
||||
/*
|
||||
* Return the rq currently locked from an scx callback, or NULL if no rq is
|
||||
* locked.
|
||||
*/
|
||||
static inline struct rq *scx_locked_rq(void)
|
||||
{
|
||||
return __this_cpu_read(scx_locked_rq_state);
|
||||
}
|
||||
|
||||
void scx_tick(struct rq *rq);
|
||||
void init_scx_entity(struct sched_ext_entity *scx);
|
||||
void scx_pre_fork(struct task_struct *p);
|
||||
|
||||
1061
kernel/sched/ext_internal.h
Normal file
1061
kernel/sched/ext_internal.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user