Skip to content

Commit 1389f49

Browse files
committed
sched_ext: Reorder args for consume_local/remote_task()
Reorder args for consistency in the order of: current_rq, p, src_[rq|dsq], dst_[rq|dsq]. No functional changes intended. Signed-off-by: Tejun Heo <[email protected]>
1 parent 18f8569 commit 1389f49

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

kernel/sched/ext.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2208,8 +2208,8 @@ static void move_task_to_local_dsq(struct task_struct *p, u64 enq_flags,
22082208

22092209
#endif /* CONFIG_SMP */
22102210

2211-
static void consume_local_task(struct rq *rq, struct scx_dispatch_q *dsq,
2212-
struct task_struct *p)
2211+
static void consume_local_task(struct task_struct *p,
2212+
struct scx_dispatch_q *dsq, struct rq *rq)
22132213
{
22142214
lockdep_assert_held(&dsq->lock); /* released on return */
22152215

@@ -2318,8 +2318,8 @@ static bool unlink_dsq_and_lock_src_rq(struct task_struct *p,
23182318
!WARN_ON_ONCE(src_rq != task_rq(p));
23192319
}
23202320

2321-
static bool consume_remote_task(struct rq *this_rq, struct scx_dispatch_q *dsq,
2322-
struct task_struct *p, struct rq *src_rq)
2321+
static bool consume_remote_task(struct rq *this_rq, struct task_struct *p,
2322+
struct scx_dispatch_q *dsq, struct rq *src_rq)
23232323
{
23242324
raw_spin_rq_unlock(this_rq);
23252325

@@ -2334,7 +2334,7 @@ static bool consume_remote_task(struct rq *this_rq, struct scx_dispatch_q *dsq,
23342334
}
23352335
#else /* CONFIG_SMP */
23362336
static inline bool task_can_run_on_remote_rq(struct task_struct *p, struct rq *rq, bool trigger_error) { return false; }
2337-
static inline bool consume_remote_task(struct rq *rq, struct scx_dispatch_q *dsq, struct task_struct *p, struct rq *task_rq) { return false; }
2337+
static inline bool consume_remote_task(struct rq *this_rq, struct task_struct *p, struct scx_dispatch_q *dsq, struct rq *task_rq) { return false; }
23382338
#endif /* CONFIG_SMP */
23392339

23402340
static bool consume_dispatch_q(struct rq *rq, struct scx_dispatch_q *dsq)
@@ -2355,12 +2355,12 @@ static bool consume_dispatch_q(struct rq *rq, struct scx_dispatch_q *dsq)
23552355
struct rq *task_rq = task_rq(p);
23562356

23572357
if (rq == task_rq) {
2358-
consume_local_task(rq, dsq, p);
2358+
consume_local_task(p, dsq, rq);
23592359
return true;
23602360
}
23612361

23622362
if (task_can_run_on_remote_rq(p, rq, false)) {
2363-
if (likely(consume_remote_task(rq, dsq, p, task_rq)))
2363+
if (likely(consume_remote_task(rq, p, dsq, task_rq)))
23642364
return true;
23652365
goto retry;
23662366
}

0 commit comments

Comments
 (0)