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] [day] [month] [year] [list]
Date:   Fri, 8 Dec 2017 15:56:48 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Pavel Machek <pavel@....cz>
Cc:     Mikulas Patocka <mpatocka@...hat.com>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] schedule: use unlikely()

On Fri, Dec 08, 2017 at 03:30:18PM +0100, Pavel Machek wrote:
> On Thu 2017-11-30 08:07:44, Greg KH wrote:
> > On Thu, Nov 30, 2017 at 02:04:01AM -0500, Mikulas Patocka wrote:
> > > 
> > > 
> > > On Tue, 28 Nov 2017, Greg KH wrote:
> > > 
> > > > On Mon, Nov 27, 2017 at 07:05:22PM -0500, Mikulas Patocka wrote:
> > > > > 
> > > > > 
> > > > > On Sat, 25 Nov 2017, Greg KH wrote:
> > > > > 
> > > > > > On Mon, Nov 13, 2017 at 02:00:45PM -0500, Mikulas Patocka wrote:
> > > > > > > A small patch for schedule(), so that the code goes straght in the common
> > > > > > > case.
> > > > > > > 
> > > > > > > Signed-off-by: Mikulas Patocka <mpatocka@...hat.com>
> > > > > > 
> > > > > > Was this a measurable difference?  If so, great, please provide the
> > > > > > numbers and how you tested in the changelog.  If it can't be measured,
> > > > > > then it is not worth it to add these markings
> > > > > 
> > > > > It is much easier to make microoptimizations (such as using likely() and 
> > > > > unlikely()) than to measure their effect.
> > > > > 
> > > > > If a programmer were required to measure performance every time he uses 
> > > > > likely() or unlikely() in his code, he wouldn't use them at all.
> > > > 
> > > > If you can not measure it, you should not use it.  You are forgetting
> > > > about the testing that was done a few years ago that found that some
> > > > huge percentage (80? 75? 90?) of all of these markings were wrong and
> > > > harmful or did absolutely nothing.
> > > 
> > > The whole kernel has 19878 likely/unlikely tags.
> > 
> > And most of them are wrong.  Don't add new ones unless you can prove it
> > is correct.
> 
> _Most_ of them wrong? Really? Where is your data for _that_?

Andi Kleen ran tests about 5 years ago or so which showed this.  It's in
the archives somewhere...

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ