]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c
authorAndrea Righi <arighi@nvidia.com>
Thu, 15 May 2025 19:11:42 +0000 (21:11 +0200)
committerTejun Heo <tj@kernel.org>
Tue, 20 May 2025 20:23:50 +0000 (10:23 -1000)
Relocate the scx_kf_allowed_if_unlocked(), so it can be used from other
source files (e.g., ext_idle.c).

No functional change.

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 52e0f9553e730b42385dadffc0274de73e2f7d79..793e288f63cf45638d0933f24430098fced0e227 100644 (file)
@@ -1387,11 +1387,6 @@ static __always_inline bool scx_kf_allowed_on_arg_tasks(u32 mask,
        return true;
 }
 
-static bool scx_kf_allowed_if_unlocked(void)
-{
-       return !current->scx.kf_mask;
-}
-
 /**
  * nldsq_next_task - Iterate to the next task in a non-local DSQ
  * @dsq: user dsq being iterated
index 3053cdd61eb9c22befb3d6c42eefb91bf4670743..6e5072f577718e08b0ba329c050b0a1fc986e460 100644 (file)
@@ -8,6 +8,11 @@
  */
 #ifdef CONFIG_SCHED_CLASS_EXT
 
+static inline bool scx_kf_allowed_if_unlocked(void)
+{
+       return !current->scx.kf_mask;
+}
+
 DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup);
 
 void scx_tick(struct rq *rq);