sched: re-do "sched: fix fair sleepers"
re-apply:
| commit e22ecef1d2
| Author: Ingo Molnar <mingo@elte.hu>
| Date: Fri Mar 14 22:16:08 2008 +0100
|
| sched: fix fair sleepers
|
| Fair sleepers need to scale their latency target down by runqueue
| weight. Otherwise busy systems will gain ever larger sleep bonus.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
hifive-unleashed-5.1
parent
3925e6fc1f
commit
018d6db4cb
|
@ -510,8 +510,10 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
|
||||||
|
|
||||||
if (!initial) {
|
if (!initial) {
|
||||||
/* sleeps upto a single latency don't count. */
|
/* sleeps upto a single latency don't count. */
|
||||||
if (sched_feat(NEW_FAIR_SLEEPERS))
|
if (sched_feat(NEW_FAIR_SLEEPERS)) {
|
||||||
vruntime -= sysctl_sched_latency;
|
vruntime -= calc_delta_fair(sysctl_sched_latency,
|
||||||
|
&cfs_rq->load);
|
||||||
|
}
|
||||||
|
|
||||||
/* ensure we never gain time by being placed backwards. */
|
/* ensure we never gain time by being placed backwards. */
|
||||||
vruntime = max_vruntime(se->vruntime, vruntime);
|
vruntime = max_vruntime(se->vruntime, vruntime);
|
||||||
|
|
Loading…
Reference in New Issue