Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kuyo Chang <kuyo.chang@mediatek.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	"Ben Segall" <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	"Valentin Schneider" <vschneid@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 1/1] sched/core: Fix migrate_swap() vs. hotplug
Date: Fri, 13 Jun 2025 15:47:47 +0800	[thread overview]
Message-ID: <c32fcf451dad1cac40ad827e53ac6c027403b07e.camel@mediatek.com> (raw)
In-Reply-To: <20250606082834.GM30486@noisy.programming.kicks-ass.net>

On Fri, 2025-06-06 at 10:28 +0200, Peter Zijlstra wrote:
> 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On Fri, Jun 06, 2025 at 11:46:57AM +0800, Kuyo Chang wrote:
> 
> > Thank you for your patch.
> > I believe this patch also effectively addresses this race
> > condition.
> > I will queue it in our test pool for testing.
> 
> Thank you; I shall await the results!
> 
It works well during both regular and hotplug tests(one week).
I believe the patch is workable.
Please help to merge, thx.

> 
> > > @@ -101,12 +98,12 @@ static bool cpu_stop_queue_work(unsigned int
> > > cpu, struct cpu_stop_work *work)
> > >         raw_spin_lock_irqsave(&stopper->lock, flags);
> > >         enabled = stopper->enabled;
> > >         if (enabled)
> > > -               __cpu_stop_queue_work(stopper, work, &wakeq);
> > > +               __cpu_stop_queue_work(stopper, work);
> > >         else if (work->done)
> > >                 cpu_stop_signal_done(work->done);
> > >         raw_spin_unlock_irqrestore(&stopper->lock, flags);
> > > 
> > > -       wake_up_q(&wakeq);
> > > +       wake_up_process(stopper->thread);
> > 
> > BTW, should we add enabled check here?
> >       if (enabled)
> >               wake_up_process(stopper->thread);
> 
> Ah yes. Spuriously waking the stopper thread is harmless, but
> wasteful.
> 
> > >         preempt_enable();
> > > 
> > >         return enabled;



  reply	other threads:[~2025-06-13  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02  7:22 [PATCH 1/1] sched/core: Fix migrate_swap() vs. hotplug Kuyo Chang
2025-06-05 10:00 ` Peter Zijlstra
2025-06-06  3:46   ` Kuyo Chang
2025-06-06  8:28     ` Peter Zijlstra
2025-06-13  7:47       ` Kuyo Chang [this message]
2025-06-26 12:53         ` Peter Zijlstra
2025-06-26  2:23       ` [SPAM]Re: " Kuyo Chang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c32fcf451dad1cac40ad827e53ac6c027403b07e.camel@mediatek.com \
    --to=kuyo.chang@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox