mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
sched/fair: Fix variable declaration position
Move variable declaration at the beginning of the function Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-12-vincent.guittot@linaro.org
This commit is contained in:
parent
61b82dfb6b
commit
0429489e09
@ -5494,6 +5494,7 @@ static bool
|
||||
dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
|
||||
{
|
||||
bool sleep = flags & DEQUEUE_SLEEP;
|
||||
int action = UPDATE_TG;
|
||||
|
||||
update_curr(cfs_rq);
|
||||
clear_buddies(cfs_rq, se);
|
||||
@ -5519,7 +5520,6 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
|
||||
}
|
||||
}
|
||||
|
||||
int action = UPDATE_TG;
|
||||
if (entity_is_task(se) && task_on_rq_migrating(task_of(se)))
|
||||
action |= DO_DETACH;
|
||||
|
||||
@ -5627,6 +5627,8 @@ static int dequeue_entities(struct rq *rq, struct sched_entity *se, int flags);
|
||||
static struct sched_entity *
|
||||
pick_next_entity(struct rq *rq, struct cfs_rq *cfs_rq)
|
||||
{
|
||||
struct sched_entity *se;
|
||||
|
||||
/*
|
||||
* Enabling NEXT_BUDDY will affect latency but not fairness.
|
||||
*/
|
||||
@ -5637,7 +5639,7 @@ pick_next_entity(struct rq *rq, struct cfs_rq *cfs_rq)
|
||||
return cfs_rq->next;
|
||||
}
|
||||
|
||||
struct sched_entity *se = pick_eevdf(cfs_rq);
|
||||
se = pick_eevdf(cfs_rq);
|
||||
if (se->sched_delayed) {
|
||||
dequeue_entities(rq, se, DEQUEUE_SLEEP | DEQUEUE_DELAYED);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user