aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Fernandes (Google) <joel@joelfernandes.org>2024-03-11 22:48:45 -0400
committerJoel Fernandes (Google) <joel@joelfernandes.org>2024-03-12 21:07:43 -0400
commit0e8ae74445f67bd8936c1c3bd236f4502c179608 (patch)
treeca5a9369298708a7bacd154123220441c45dc913
parentfa67ef3fb5d6426b7b02181b6f133544cd3fa038 (diff)
downloadlinux-dlserver-mar-fixes.tar.gz
sched/deadline: Always start a new period if CFS exceeded DL runtimedlserver-mar-fixes
We believe that this is the right thing to do. The unit test (cs_dlserver_test) also agrees. If we let the CFS run without starting a new period, while the server is regularly throttled, then the test fails because CFS does not appear to get enough bandwidth. Intuitively, this makes sense to do as well. If CFS used up all the CFS bandwidth, while the DL server was in a throttled state, it got the bandwidth it wanted and some. Now, we can start all over from scratch to guarantee it a minimum bandwidth. Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
-rw-r--r--kernel/sched/deadline.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 179369d27f66b..a0ea668ac1bfe 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1454,23 +1454,6 @@ static void update_curr_dl_se(struct rq *rq, struct sched_dl_entity *dl_se, s64
* starting a new period, pushing the activation to the zero-lax time.
*/
if (dl_se->dl_defer && dl_se->dl_throttled && dl_runtime_exceeded(dl_se)) {
- s64 runtime_diff = dl_se->runtime + dl_se->dl_runtime;
-
- /*
- * If this is a regular throttling case, let it run negative until
- * the dl_runtime - runtime > 0. The reason being is that the next
- * replenishment will result in a positive runtime one period ahead.
- *
- * Otherwise, the deadline will be pushed more than one period, not
- * providing runtime/period anymore.
- *
- * If the dl_runtime - runtime < 0, then the server was able to get
- * the runtime/period before the replenishment. So it is safe
- * to start a new deffered period.
- */
- if (!dl_se->dl_defer_armed && runtime_diff > 0)
- return;
-
hrtimer_try_to_cancel(&dl_se->dl_timer);
replenish_dl_new_period(dl_se, dl_se->rq);