* [PATCH] sched/deadline: fix BUG_ON() ENQUEUE_REPLENISH check
@ 2021-02-06 20:48 trix
2021-02-08 10:41 ` Juri Lelli
0 siblings, 1 reply; 2+ messages in thread
From: trix @ 2021-02-06 20:48 UTC (permalink / raw
To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, mgorman, bristot
Cc: linux-kernel, Tom Rix
From: Tom Rix <trix@redhat.com>
When the BUG_ON check for (flags != ENQUEUE_REPLENISH) was created, the
flag was set to ENQUEUE_REPLENISH in rt_mutex_setprio(), now it is or-ed
in. So the checking logic needs to change.
Fixes: 1de64443d755 ("sched/core: Fix task and run queue sched_info::run_delay inconsistencies")
Signed-off-by: Tom Rix <trix@redhat.com>
---
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 1508d126e88b..f50d20b7fe7c 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1561,7 +1561,7 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags)
* the throttle.
*/
p->dl.dl_throttled = 0;
- BUG_ON(!is_dl_boosted(&p->dl) || flags != ENQUEUE_REPLENISH);
+ BUG_ON(!is_dl_boosted(&p->dl) || !(flags & ENQUEUE_REPLENISH));
return;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sched/deadline: fix BUG_ON() ENQUEUE_REPLENISH check
2021-02-06 20:48 [PATCH] sched/deadline: fix BUG_ON() ENQUEUE_REPLENISH check trix
@ 2021-02-08 10:41 ` Juri Lelli
0 siblings, 0 replies; 2+ messages in thread
From: Juri Lelli @ 2021-02-08 10:41 UTC (permalink / raw
To: trix
Cc: mingo, peterz, vincent.guittot, dietmar.eggemann, rostedt,
bsegall, mgorman, bristot, linux-kernel
Hi,
On 06/02/21 12:48, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> When the BUG_ON check for (flags != ENQUEUE_REPLENISH) was created, the
> flag was set to ENQUEUE_REPLENISH in rt_mutex_setprio(), now it is or-ed
> in. So the checking logic needs to change.
>
> Fixes: 1de64443d755 ("sched/core: Fix task and run queue sched_info::run_delay inconsistencies")
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> 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 1508d126e88b..f50d20b7fe7c 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -1561,7 +1561,7 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags)
> * the throttle.
> */
> p->dl.dl_throttled = 0;
> - BUG_ON(!is_dl_boosted(&p->dl) || flags != ENQUEUE_REPLENISH);
> + BUG_ON(!is_dl_boosted(&p->dl) || !(flags & ENQUEUE_REPLENISH));
Uhu, isn't this actually the else branch of "if (is_dl_boosted())"? If
yes, I don't see how this is not always triggering. :-/
Thanks,
Juri
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-08 10:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-06 20:48 [PATCH] sched/deadline: fix BUG_ON() ENQUEUE_REPLENISH check trix
2021-02-08 10:41 ` Juri Lelli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.