Re: [PATCH 2/2] sched/hotplug: Ensure only per-cpu kthreads run during hotplug

2020-09-16 Thread peterz
On Wed, Sep 16, 2020 at 03:58:17PM +0200, Sebastian Andrzej Siewior wrote: > On 2020-09-16 14:10:20 [+0200], pet...@infradead.org wrote: > > squeeze that in please: > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index a4fe22b8b8418..bed3cd28af578 100644 > --- a/kernel/sched/core.c >

Re: [PATCH 2/2] sched/hotplug: Ensure only per-cpu kthreads run during hotplug

2020-09-16 Thread Sebastian Andrzej Siewior
On 2020-09-16 14:10:20 [+0200], pet...@infradead.org wrote: squeeze that in please: diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a4fe22b8b8418..bed3cd28af578 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6866,7 +6866,7 @@ static int __balance_push_cpu_stop(void *a

Re: [PATCH 2/2] sched/hotplug: Ensure only per-cpu kthreads run during hotplug

2020-09-16 Thread peterz
On Wed, Sep 16, 2020 at 12:18:45PM +0200, Sebastian Andrzej Siewior wrote: > With this on top of -rc5 I get: > > [ 42.678670] process 1816 (hackbench) no longer affine to cpu2 > [ 42.678684] process 1817 (hackbench) no longer affine to cpu2 > [ 42.710502] [ cut here ]

Re: [PATCH 2/2] sched/hotplug: Ensure only per-cpu kthreads run during hotplug

2020-09-16 Thread Sebastian Andrzej Siewior
On 2020-09-11 10:17:47 [+0200], Peter Zijlstra wrote: > In preparation for migrate_disable(), make sure only per-cpu kthreads > are allowed to run on !active CPUs. > > This is ran (as one of the very first steps) from the cpu-hotplug > task which is a per-cpu kthread and completion of the hotplug

Re: [PATCH 2/2] sched/hotplug: Ensure only per-cpu kthreads run during hotplug

2020-09-11 Thread peterz
On Fri, Sep 11, 2020 at 01:17:45PM +0100, Valentin Schneider wrote: > > @@ -6968,6 +7064,8 @@ int sched_cpu_deactivate(unsigned int cp > >*/ > > synchronize_rcu(); > > > > + balance_push_set(cpu, true); > > + > > IIUC this is going to make every subsequent finish_lock_switch() > m

Re: [PATCH 2/2] sched/hotplug: Ensure only per-cpu kthreads run during hotplug

2020-09-11 Thread Valentin Schneider
On 11/09/20 13:29, pet...@infradead.org wrote: > On Fri, Sep 11, 2020 at 01:17:45PM +0100, Valentin Schneider wrote: > >> > @@ -6968,6 +7064,8 @@ int sched_cpu_deactivate(unsigned int cp >> >*/ >> > synchronize_rcu(); >> > >> > + balance_push_set(cpu, true); >> > + >> >> IIUC this

Re: [PATCH 2/2] sched/hotplug: Ensure only per-cpu kthreads run during hotplug

2020-09-11 Thread Valentin Schneider
(+Cc VincentD, who's been looking at some of this) On 11/09/20 09:17, Peter Zijlstra wrote: > In preparation for migrate_disable(), make sure only per-cpu kthreads > are allowed to run on !active CPUs. > > This is ran (as one of the very first steps) from the cpu-hotplug > task which is a per-cp

[PATCH 2/2] sched/hotplug: Ensure only per-cpu kthreads run during hotplug

2020-09-11 Thread Peter Zijlstra
In preparation for migrate_disable(), make sure only per-cpu kthreads are allowed to run on !active CPUs. This is ran (as one of the very first steps) from the cpu-hotplug task which is a per-cpu kthread and completion of the hotplug operation only requires such tasks. This contraint enables the