[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <177646b0c427786c90a8ccb67f5b956a12759d3a.camel@gmx.de>
Date: Fri, 20 Sep 2024 04:15:30 +0200
From: Mike Galbraith <efault@....de>
To: Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
peterz@...radead.org, vschneid@...hat.com, mingo@...nel.org,
sfr@...b.auug.org.au
Subject: Re: [patch] Re: [PowerPC][Linux-next][6.11.0-rc4-next-20240820]
OOPs while running LTP FS Stress
On Thu, 2024-09-19 at 20:09 +0530, Venkat Rao Bagalkote wrote:
>
> Please add the below tags.
>
>
> Reported-by: Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>
>
> Tested-by: Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>
Sure, and while at it I can brush patchlet's rather scruffy fur.
1. on_rq being implied by sched_delayed, redundant check can go.
2. no tasks anywhere in sight, DEQUEUE_SPECIAL can go.
3. use of unlikely in an unlikely path can also go.
No functional change. Too bad everything around there fits in 80
characters, or a couple useless diffstat plus signs could go too.
sched: Fix sched_delayed vs cfs_bandwidth
Meeting an unfinished DELAY_DEQUEUE treated entity in unthrottle_cfs_rq()
leads to a couple terminal scenarios. Finish it first, so ENQUEUE_WAKEUP
can proceed as it would have sans DELAY_DEQUEUE treatment.
Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue")
Reported-by: Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>
Signed-off-by: Mike Galbraith <efault@....de>
---
kernel/sched/fair.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6049,10 +6049,13 @@ void unthrottle_cfs_rq(struct cfs_rq *cf
for_each_sched_entity(se) {
struct cfs_rq *qcfs_rq = cfs_rq_of(se);
- if (se->on_rq) {
- SCHED_WARN_ON(se->sched_delayed);
+ /* Handle any unfinished DELAY_DEQUEUE business first. */
+ if (se->sched_delayed) {
+ int flags = DEQUEUE_SLEEP | DEQUEUE_DELAYED;
+
+ dequeue_entity(qcfs_rq, se, flags);
+ } else if (se->on_rq)
break;
- }
enqueue_entity(qcfs_rq, se, ENQUEUE_WAKEUP);
if (cfs_rq_is_idle(group_cfs_rq(se)))
Powered by blists - more mailing lists