Re: [PATCH] sched/smt: fix unbalance sched_smt_present dec/inc

From: Chen Yu
Date: Tue Sep 05 2023 - 12:20:45 EST


On 2023-09-04 at 10:26:20 +0800, Chen Yu wrote:
> Hi Yingliang,
>
> On 2023-09-02 at 15:46:09 +0800, Yang Yingliang wrote:
>
> While checking the code, it seems that the core scheduling also missed
> the error path, maybe we should also invoke sched_core_cpu_starting() to
> restore the context. I'll have a check.

After checking the core scheduling code, there is no need to restore
the context 'broken' by sched_core_cpu_deactivate(). It just tries to
find a new leader if the offline CPU is the old leader, and it should
not have any impact to switch to a new leader if the cpu hotplug offline
fails.

thanks,
Chenyu