mirror of
https://github.com/torvalds/linux.git
synced 2026-10-23 23:51:02 +02:00
sched/fair: Remove dead code on enqueue_task_fair()
The 'cfs_rq->curr == se' path on enqueue_task_fair() seems to be unachievable. Remove the code that depends on this cfs_rq->curr == se case on enqueue_task_fair() and bool curr too since there are two possibilities and one has been removed, we can proceed directly with the other. Signed-off-by: Kayra Cizmeci <kayracizmeci@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260911155449.1249726-1-kayracizmeci@gmail.com
This commit is contained in:
parent
c72945693b
commit
819224e506
|
|
@ -7988,7 +7988,6 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
|
|||
struct sched_entity *se = &p->se;
|
||||
struct cfs_rq *cfs_rq = &rq->cfs;
|
||||
unsigned long weight;
|
||||
bool curr;
|
||||
|
||||
if (task_is_throttled(p) && enqueue_throttled_task(p))
|
||||
return;
|
||||
|
|
@ -8017,23 +8016,14 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
|
|||
if (p->in_iowait)
|
||||
cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT);
|
||||
|
||||
/*
|
||||
* XXX comment on the curr thing
|
||||
*/
|
||||
curr = (cfs_rq->curr == se);
|
||||
if (curr)
|
||||
place_entity(cfs_rq, se, flags);
|
||||
|
||||
if (se->on_rq && se->sched_delayed)
|
||||
requeue_delayed_entity(cfs_rq, se);
|
||||
|
||||
weight = enqueue_hierarchy(p, flags);
|
||||
|
||||
if (!curr) {
|
||||
reweight_eevdf(cfs_rq, se, weight, false);
|
||||
place_entity(cfs_rq, se, flags | ENQUEUE_QUEUED);
|
||||
__enqueue_entity(cfs_rq, se);
|
||||
}
|
||||
reweight_eevdf(cfs_rq, se, weight, false);
|
||||
place_entity(cfs_rq, se, flags | ENQUEUE_QUEUED);
|
||||
__enqueue_entity(cfs_rq, se);
|
||||
|
||||
if (!rq_h_nr_queued && rq->cfs.h_nr_queued)
|
||||
dl_server_start(&rq->fair_server);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user