lkml.org 
[lkml]   [2024]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 12/15] sched/deadline: Reverse args to dl_time_before in replenish
Date
From: Suleiman Souhlal <suleiman@google.com>

dl_time_before() seems to be incorrectly used, we need to check that the
0-laxity time is ahead of the rq_clock. Fix it.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
kernel/sched/deadline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 1d54231fbaa6..dbba95d364e2 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -914,7 +914,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se)
* is in the future, throttle the server and arm the zero laxity timer.
*/
if (dl_se->dl_defer &&
- dl_time_before(dl_se->deadline - dl_se->runtime, rq_clock(rq))) {
+ dl_time_before(rq_clock(rq), dl_se->deadline - dl_se->runtime)) {
if (!is_dl_boosted(dl_se)) {
dl_se->dl_defer_armed = 1;
dl_se->dl_throttled = 1;
--
2.34.1

\
 
 \ /
  Last update: 2024-05-27 15:46    [W:0.148 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site