[SPAM]Re: [PATCH 1/1] sched/core: Fix migrate_swap() vs. hotplug

Kuyo Chang kuyo.chang at mediatek.com
Wed Jun 25 19:23:18 PDT 2025


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!
> 
> 
Gentle ping if forgotten.

It works well during both regular and hotplug tests(more than two
week).

May I know if this patch can be merged into the mainline?

Thanks!

> > > @@ -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;




More information about the Linux-mediatek mailing list