lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 1 Oct 2020 09:33:09 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Vincent Guittot <vincent.guittot@...aro.org>
Cc:     Peter Oskolkov <posk@...gle.com>, Ingo Molnar <mingo@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Peter Oskolkov <posk@...k.io>
Subject: Re: [PATCH] sched/fair: tweak pick_next_entity

On Thu, Oct 01, 2020 at 09:17:43AM +0200, Vincent Guittot wrote:
> On Wed, 30 Sep 2020 at 19:35, Peter Oskolkov <posk@...gle.com> 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 over last buddy;
> > the current code somewhat obfuscates this, and also wastes
> > cycles checking the last buddy when eventually the next buddy is
> > picked up.
> >
> > So this patch refactors two 'ifs' above into
> >
> > [...]
> > if (next_buddy_ok())
> >     result = next_buddy;
> > else if (last_buddy_ok())
> >     result = last_buddy;
> > [...]
> >
> > Signed-off-by: Peter Oskolkov <posk@...gle.com>
> 
> Reviewed-by: Vincent Guittot <vincent.guitttot@...aro.org>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ