Re: [PATCH v2] sched,fair: skip newidle_balance if a wakeup is pending

2021-04-20 Thread Vincent Guittot
On Tue, 20 Apr 2021 at 17:20, Rik van Riel wrote: > > On Tue, 2021-04-20 at 11:04 +0200, Vincent Guittot wrote: > > On Mon, 19 Apr 2021 at 18:51, Rik van Riel wrote: > > > > > > @@ -10688,7 +10697,7 @@ static int newidle_balance(struct rq > > > *this_rq, struct rq_flags *rf) > > > if (thi

Re: [PATCH v2] sched,fair: skip newidle_balance if a wakeup is pending

2021-04-20 Thread Rik van Riel
On Tue, 2021-04-20 at 11:04 +0200, Vincent Guittot wrote: > On Mon, 19 Apr 2021 at 18:51, Rik van Riel wrote: > > > > @@ -10688,7 +10697,7 @@ static int newidle_balance(struct rq > > *this_rq, struct rq_flags *rf) > > if (this_rq->nr_running != this_rq->cfs.h_nr_running) > >

Re: [PATCH v2] sched,fair: skip newidle_balance if a wakeup is pending

2021-04-20 Thread Vincent Guittot
On Mon, 19 Apr 2021 at 18:51, Rik van Riel wrote: > > The try_to_wake_up function has an optimization where it can queue > a task for wakeup on its previous CPU, if the task is still in the > middle of going to sleep inside schedule(). > > Once schedule() re-enables IRQs, the task will be woken up

[PATCH v2] sched,fair: skip newidle_balance if a wakeup is pending

2021-04-19 Thread Rik van Riel
The try_to_wake_up function has an optimization where it can queue a task for wakeup on its previous CPU, if the task is still in the middle of going to sleep inside schedule(). Once schedule() re-enables IRQs, the task will be woken up with an IPI, and placed back on the runqueue. If we have suc