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]
Message-ID: <CAKfTPtBM_AKD7iMyPo6Wv=FOvG3bBaDvZLyrD=RZHrdUzaQNxg@mail.gmail.com>
Date:   Fri, 8 Nov 2019 17:46:28 +0100
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     Quentin Perret <qperret@...gle.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Valentin Schneider <valentin.schneider@....com>,
        Qais Yousef <qais.yousef@....com>, ktkhai@...tuozzo.com
Subject: Re: [PATCH 4/7] sched: Optimize pick_next_task()

On Fri, 8 Nov 2019 at 15:33, Quentin Perret <qperret@...gle.com> wrote:
>
> On Friday 08 Nov 2019 at 14:15:57 (+0100), Peter Zijlstra wrote:
> > Ever since we moved the sched_class defenitions into their own files,
>
> s/defenitions/definitions
>
> > the constant expression {fair,idle}_sched_class.pick_next_task() is
> > not in fact a compile time constant anymore and results in an indirect
> > call (barring LTO).
> >
> > Fix that by exposing pick_next_task_{fair,idle}() directly, this gets
> > rid of the indirect call (and RETPOLINE) on the fast path.
> >
> > Also remove the unlikely() from the idle case, it is in fact /the/ way
> > we select idle -- and that is a very common thing to do.
>
> I assumed this was to optimize the case where we did find a cfs task to
> run. That is, we can afford to hit the unlikely case when there is no
> work to do after, but when there is, we shouldn't spend time checking
> the idle case. Makes sense ?

I have the same understanding as Quentin

>
> Thanks,
> Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ