]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched_ext: Make scx_rq_bypassing() inline
authorAndrea Righi <arighi@nvidia.com>
Wed, 4 Jun 2025 14:33:13 +0000 (16:33 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 9 Jun 2025 16:25:24 +0000 (06:25 -1000)
scx_rq_bypassing() is used both from ext.c and ext_idle.c, move it to
ext.h as a static inline function.

No functional changes.

Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c
kernel/sched/ext.h

index 2c41c78be61ebbac6bfb654878e98277d04de149..3e483138dff6085383ec018a6ba3d40fae582bb4 100644 (file)
@@ -1701,11 +1701,6 @@ static bool scx_tryset_enable_state(enum scx_enable_state to,
        return atomic_try_cmpxchg(&scx_enable_state_var, &from_v, to);
 }
 
-static bool scx_rq_bypassing(struct rq *rq)
-{
-       return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
-}
-
 /**
  * wait_ops_state - Busy-wait the specified ops state to end
  * @p: target task
index 6e5072f577718e08b0ba329c050b0a1fc986e460..d30f2d1bc00d55902ceab1085f9c9884aaf7fc75 100644 (file)
@@ -13,6 +13,11 @@ 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);
 
 void scx_tick(struct rq *rq);