[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z5MxUBNheFBpNvZ_@gpd3>
Date: Fri, 24 Jan 2025 07:21:04 +0100
From: Andrea Righi <arighi@...dia.com>
To: Changwoo Min <changwoo@...lia.com>
Cc: Tejun Heo <tj@...nel.org>, David Vernet <void@...ifault.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: Fix lock imbalance in dispatch_to_local_dsq()
On Fri, Jan 24, 2025 at 11:21:33AM +0900, Changwoo Min wrote:
> Hello Andrea,
>
> On 25. 1. 24. 08:42, Andrea Righi wrote:
> > kernel/sched/ext.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> > index a24d48cebfb7..7500b1a26757 100644
> > --- a/kernel/sched/ext.c
> > +++ b/kernel/sched/ext.c
> > @@ -2617,6 +2617,8 @@ static void dispatch_to_local_dsq(struct rq *rq, struct scx_dispatch_q *dst_dsq,
> > /* if the destination CPU is idle, wake it up */
> > if (sched_class_above(p->sched_class, dst_rq->curr->sched_class))
> > resched_curr(dst_rq);
> > + } else {
> > + dst_rq = src_rq;
> > }
>
> The fix makes sense to me. Since this is a very specific and
> tricky case, it will be better to include detailed comments in
> the else part so anyone can easily understand why the else part
> is necessary.
Good idea, I'll send a v2 including a comment in the else part.
Thanks!
-Andrea
Powered by blists - more mailing lists