[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e49e2b73aae471514f277d89bc925da269c89d6.camel@mediatek.com>
Date: Wed, 8 Jun 2022 22:16:43 +0800
From: Jing-Ting Wu <jing-ting.wu@...iatek.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>, <tglx@...utronix.de>,
<wsd_upstream@...iatek.com>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<Jonathan.JMChen@...iatek.com>,
"chris.redpath@....com" <chris.redpath@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Vincent Donnefort <vdonnefort@...il.com>,
"Ingo Molnar" <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
"Vincent Guittot" <vincent.guittot@...aro.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
"Christian Brauner" <brauner@...nel.org>
Subject: Re: [PATCH] sched: Fix balance_push() vs __sched_setscheduler()
Hi Peter
On Tue, 2022-06-07 at 23:39 +0200, Peter Zijlstra wrote:
> On Tue, Jun 07, 2022 at 10:40:36PM +0200, Peter Zijlstra wrote:
> > On Fri, Jun 03, 2022 at 12:15:51AM +0800, Jing-Ting Wu wrote:
> > > The patch is helpful to the syndrome, passed stability test over
> > > 10
> > > days so far. (as-is: < 48 hours failed)
> >
> > Excellent, let me go write a Changelog for it, or something.
>
> How's this then?
I think the description is fine.
Thanks for your help.
[...]
>
> -static inline struct callback_head *splice_balance_callbacks(struct
> rq *rq)
> +static inline struct callback_head *
> +__splice_balance_callbacks(struct rq *rq, bool split)
> {
> struct callback_head *head = rq->balance_callback;
>
> + if (likely(!head))
> + return NULL;
> +
> lockdep_assert_rq_held(rq);
> - if (head)
> + /*
> + * Must not take balance_push_callback off the list when
> + * splace_balance_callbac() and balance_callbacks() are not
Should we change splace_balance_callbac() to splice_balance_callbacks()
at here?
> + * in the same rq->lock section.
> + *
> + * In that case it would be possible for __schedule() to
> interleave
> + * and observe the list empty.
> + */
> + if (split && head == &balance_push_callback)
> + head = NULL;
> + else
> rq->balance_callback = NULL;
>
> return head;
> }
>
[...]
Best Regards,
Jing-Ting Wu
Powered by blists - more mailing lists