* Question on workqueue: Manually break affinity on hotplug
@ 2021-01-14 8:03 Zhang, Qiang
2021-01-14 9:11 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Qiang @ 2021-01-14 8:03 UTC (permalink / raw
To: peterz@infradead.org; +Cc: linux-kernel@vger.kernel.org
Hello Peter
Excuse me, I have some questions for you, about a description of this change:
''Don't rely on the scheduler to force break affinity for us -- it will
stop doing that for per-cpu-kthreads."
this mean when cpuhotplug, scheduler do not change affinity for per-cpu-kthread's task, if we not active setting affinity?
but if per-cpu-kthread's task is not run state, when wake up, will reset it's affinity, this is done automatically.
or is it, this place modified to fit the new one hotplug mechanism which
("sched/hotplug: Consolidate task migration on CPU unplug")?
Thanks
Qiang
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question on workqueue: Manually break affinity on hotplug
2021-01-14 8:03 Question on workqueue: Manually break affinity on hotplug Zhang, Qiang
@ 2021-01-14 9:11 ` Peter Zijlstra
2021-01-17 10:16 ` 回复: " Zhang, Qiang
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2021-01-14 9:11 UTC (permalink / raw
To: Zhang, Qiang; +Cc: linux-kernel@vger.kernel.org
On Thu, Jan 14, 2021 at 08:03:23AM +0000, Zhang, Qiang wrote:
> Hello Peter
>
> Excuse me, I have some questions for you, about a description of this change:
>
> ''Don't rely on the scheduler to force break affinity for us -- it will
> stop doing that for per-cpu-kthreads."
>
> this mean when cpuhotplug, scheduler do not change affinity for per-cpu-kthread's task, if we not active setting affinity?
> but if per-cpu-kthread's task is not run state, when wake up, will reset it's affinity, this is done automatically.
>
> or is it, this place modified to fit the new one hotplug mechanism which
> ("sched/hotplug: Consolidate task migration on CPU unplug")?
https://lkml.kernel.org/r/20201214155457.3430-1-jiangshanlai@gmail.com
https://lkml.kernel.org/r/20201218170919.2950-1-jiangshanlai@gmail.com
https://lkml.kernel.org/r/20201226025117.2770-1-jiangshanlai@gmail.com
https://lkml.kernel.org/r/20210111152638.2417-1-jiangshanlai@gmail.com
https://lkml.kernel.org/r/20210112144344.850850975@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* 回复: Question on workqueue: Manually break affinity on hotplug
2021-01-14 9:11 ` Peter Zijlstra
@ 2021-01-17 10:16 ` Zhang, Qiang
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qiang @ 2021-01-17 10:16 UTC (permalink / raw
To: Peter Zijlstra, laijs@linux.alibaba.com; +Cc: linux-kernel@vger.kernel.org
Hello Peter, Lai
Sorry to disturb again, I'm still confused, when the CPU is offline, we active call set_cpus_allowed_ptr function to reset per-cpu kthread cpumask,
in sched_cpu_dying function , migrate_tasks function will reset per-cpu kthread's cpumask on runq, even if not on runq, when wake up, other online CPUs will also be selected to run.
what I want to ask is why we take the initiative to set it up?
Thanks
Qiang
________________________________________
发件人: Peter Zijlstra <peterz@infradead.org>
发送时间: 2021年1月14日 17:11
收件人: Zhang, Qiang
抄送: linux-kernel@vger.kernel.org
主题: Re: Question on workqueue: Manually break affinity on hotplug
[Please note this e-mail is from an EXTERNAL e-mail address]
On Thu, Jan 14, 2021 at 08:03:23AM +0000, Zhang, Qiang wrote:
> Hello Peter
>
> Excuse me, I have some questions for you, about a description of this change:
>
> ''Don't rely on the scheduler to force break affinity for us -- it will
> stop doing that for per-cpu-kthreads."
>
> this mean when cpuhotplug, scheduler do not change affinity for per-cpu-kthread's task, if we not active setting affinity?
> but if per-cpu-kthread's task is not run state, when wake up, will reset it's affinity, this is done automatically.
>
> or is it, this place modified to fit the new one hotplug mechanism which
> ("sched/hotplug: Consolidate task migration on CPU unplug")?
https://lkml.kernel.org/r/20201214155457.3430-1-jiangshanlai@gmail.com
https://lkml.kernel.org/r/20201218170919.2950-1-jiangshanlai@gmail.com
https://lkml.kernel.org/r/20201226025117.2770-1-jiangshanlai@gmail.com
https://lkml.kernel.org/r/20210111152638.2417-1-jiangshanlai@gmail.com
https://lkml.kernel.org/r/20210112144344.850850975@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-17 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-14 8:03 Question on workqueue: Manually break affinity on hotplug Zhang, Qiang
2021-01-14 9:11 ` Peter Zijlstra
2021-01-17 10:16 ` 回复: " Zhang, Qiang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.