Skip to content

Commit

Permalink
Revert "sched/fair: Introduce SIS_SHORT to wake up short task on curr…
Browse files Browse the repository at this point in the history
…ent CPU"

This reverts commit 883101d.
  • Loading branch information
xanmod committed Apr 25, 2023
1 parent fec91f7 commit bbacf08
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
26 changes: 0 additions & 26 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -6536,20 +6536,6 @@ static int wake_wide(struct task_struct *p)
return 1;
}

/*
* If a task switches in and then voluntarily relinquishes the
* CPU quickly, it is regarded as a short duration task.
*
* SIS_SHORT tries to wake up the short wakee on current CPU. This
* aims to avoid race condition among CPUs due to frequent context
* switch.
*/
static inline int is_short_task(struct task_struct *p)
{
return sched_feat(SIS_SHORT) && p->se.dur_avg &&
((p->se.dur_avg * 8) < sysctl_sched_min_granularity);
}

/*
* The purpose of wake_affine() is to quickly determine on which CPU we can run
* soonest. For the purpose of speed we only consider the waking and previous
Expand Down Expand Up @@ -6586,11 +6572,6 @@ wake_affine_idle(int this_cpu, int prev_cpu, int sync)
if (available_idle_cpu(prev_cpu))
return prev_cpu;

/* The only running task is a short duration one. */
if (cpu_rq(this_cpu)->nr_running == 1 &&
is_short_task(rcu_dereference(cpu_curr(this_cpu))))
return this_cpu;

return nr_cpumask_bits;
}

Expand Down Expand Up @@ -6965,13 +6946,6 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool
/* overloaded LLC is unlikely to have idle cpu/core */
if (nr == 1)
return -1;

if (!has_idle_core && this == target &&
(5 * nr < 3 * sd->span_weight) &&
cpu_rq(target)->nr_running <= 1 &&
is_short_task(p) &&
is_short_task(rcu_dereference(cpu_curr(target))))
return target;
}
}

Expand Down
1 change: 0 additions & 1 deletion kernel/sched/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ SCHED_FEAT(TTWU_QUEUE, true)
*/
SCHED_FEAT(SIS_PROP, false)
SCHED_FEAT(SIS_UTIL, true)
SCHED_FEAT(SIS_SHORT, true)

/*
* Issue a WARN when we do multiple update_rq_clock() calls
Expand Down

0 comments on commit bbacf08

Please sign in to comment.