Commit 0c2b8356 authored by Tejun Heo's avatar Tejun Heo
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarAndrea Righi <arighi@nvidia.com>
parent 4a1d9d73
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@
#include "deadline.c"

#ifdef CONFIG_SCHED_CLASS_EXT
# include "ext_internal.h"
# include "ext.c"
# include "ext_idle.c"
#endif
+0 −1034

File changed.

Preview size limit exceeded, changes collapsed.

+0 −23
Original line number Diff line number Diff line
@@ -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 −0

File added.

Preview size limit exceeded, changes collapsed.