Re: [PATCH] sched/fair: tweak pick_next_entity

2020-10-01 Thread Peter Zijlstra
On Thu, Oct 01, 2020 at 09:17:43AM +0200, Vincent Guittot wrote: > On Wed, 30 Sep 2020 at 19:35, Peter Oskolkov wrote: > > > > Currently, pick_next_entity(...) has the following structure > > (simplified): > > > > [...] > > if (last_buddy_ok()) > > result = last_buddy; > > if (next_buddy_ok()) >

Re: [PATCH] sched/fair: tweak pick_next_entity

2020-10-01 Thread Vincent Guittot
On Wed, 30 Sep 2020 at 19:35, Peter Oskolkov wrote: > > Currently, pick_next_entity(...) has the following structure > (simplified): > > [...] > if (last_buddy_ok()) > result = last_buddy; > if (next_buddy_ok()) > result = next_buddy; > [...] > > The intended behavior is to prefer next buddy o

[PATCH] sched/fair: tweak pick_next_entity

2020-09-30 Thread Peter Oskolkov
Currently, pick_next_entity(...) has the following structure (simplified): [...] if (last_buddy_ok()) result = last_buddy; if (next_buddy_ok()) result = next_buddy; [...] The intended behavior is to prefer next buddy over last buddy; the current code somewhat obfuscates this, and also wastes