summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2026-10-26 14:17:36 -1000
committerTejun Heo <tj@kernel.org>2026-10-27 09:40:56 -1000
commit867d0ac6d730768610eae7fc41f5dd3b70b8d1a4 (patch)
treee545042968cb5abc715c9814f97773dade70ebea /kernel
parenta676ada0d6544928c0ceb032fb991a9abe0977db (diff)
sched_ext: Move refill_task_slice_dfl() below apply_slice_vtime()
Move refill_task_slice_dfl() below apply_slice_vtime(), with the other slice writers, to prepare for the kernel-slice handling the following patches add to them. No functional change. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/ext/ext.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index 38946df9aa61..d1404a4e1564 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -1569,6 +1569,16 @@ static void apply_slice_vtime(struct task_struct *p, u64 slice, u64 vtime, u64 e
p->scx.dsq_vtime = vtime;
}
+static void refill_task_slice_dfl(struct scx_sched *sch, struct task_struct *p)
+{
+ /*
+ * A default refill is not an explicit request, so it must not drop a
+ * pending out-of-band one, which is applied when @p next runs.
+ */
+ set_task_slice_keep_oob(p, READ_ONCE(sch->slice_dfl));
+ __scx_add_event(sch, SCX_EV_REFILL_SLICE_DFL, 1);
+}
+
static void update_curr_scx(struct rq *rq)
{
struct task_struct *donor;
@@ -1662,16 +1672,6 @@ static void dsq_dec_nr(struct scx_dispatch_q *dsq, struct task_struct *p)
}
}
-static void refill_task_slice_dfl(struct scx_sched *sch, struct task_struct *p)
-{
- /*
- * A default refill is not an explicit request, so it must not drop a
- * pending out-of-band one, which is applied when @p next runs.
- */
- set_task_slice_keep_oob(p, READ_ONCE(sch->slice_dfl));
- __scx_add_event(sch, SCX_EV_REFILL_SLICE_DFL, 1);
-}
-
/*
* Return true if @p is moving due to an internal SCX migration, false
* otherwise.