Re: [PATCH 6/6] sched: Simplify set_affinity_pending refcounts

2021-02-25 Thread Valentin Schneider
On 25/02/21 10:27, Peter Zijlstra wrote: > On Wed, Feb 24, 2021 at 05:59:01PM +, Valentin Schneider wrote: > >> Your change reinstores the "triple SCA" pattern, where a stopper can run >> with arg->pending && arg->pending != p->migration_pending, which I was >> kinda happy to see go away... > >

Re: [PATCH 6/6] sched: Simplify set_affinity_pending refcounts

2021-02-25 Thread Peter Zijlstra
On Wed, Feb 24, 2021 at 05:59:01PM +, Valentin Schneider wrote: > Your change reinstores the "triple SCA" pattern, where a stopper can run > with arg->pending && arg->pending != p->migration_pending, which I was > kinda happy to see go away... Right, fair enough. Any workload that can tell th

Re: [PATCH 6/6] sched: Simplify set_affinity_pending refcounts

2021-02-24 Thread Valentin Schneider
On 24/02/21 16:34, Peter Zijlstra wrote: > Elsewhere Valentin argued something like the below ought to be possible. > I've not drawn diagrams yet, but if I understood his argument right it > should be possible. > > --- > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 1c56ac4df2c9..3

Re: [PATCH 6/6] sched: Simplify set_affinity_pending refcounts

2021-02-24 Thread Valentin Schneider
On 24/02/21 13:24, Peter Zijlstra wrote: > Now that we have set_affinity_pending::stop_pending to indicate if a > stopper is in progress, and we have the guarantee that if that stopper > exists, it will (eventually) complete our @pending we can simplify the > refcount scheme by no longer counting t

Re: [PATCH 6/6] sched: Simplify set_affinity_pending refcounts

2021-02-24 Thread Peter Zijlstra
On Wed, Feb 24, 2021 at 01:24:45PM +0100, Peter Zijlstra wrote: > @@ -2199,12 +2199,16 @@ static int affine_move_task(struct rq *r > push_task = get_task_struct(p); > } > > + /* > + * If there are pending waiters, but no pending stop_wo

[PATCH 6/6] sched: Simplify set_affinity_pending refcounts

2021-02-24 Thread Peter Zijlstra
Now that we have set_affinity_pending::stop_pending to indicate if a stopper is in progress, and we have the guarantee that if that stopper exists, it will (eventually) complete our @pending we can simplify the refcount scheme by no longer counting the stopper thread. Fixes: 6d337eab041d ("sched: