All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] schedule: use unlikely()
Date: Fri, 8 Dec 2017 15:30:18 +0100	[thread overview]
Message-ID: <20171208143018.GH7793@amd> (raw)
In-Reply-To: <20171130080744.GA16177@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]

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@redhat.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_?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2017-12-08 14:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 19:00 [PATCH] schedule: use unlikely() Mikulas Patocka
2017-11-24  7:38 ` Ingo Molnar
2017-11-24 18:47   ` Mikulas Patocka
2017-11-25  8:16     ` Ingo Molnar
2017-11-28  3:36       ` Mikulas Patocka
2017-11-25  8:56 ` Greg KH
2017-11-28  0:05   ` Mikulas Patocka
2017-11-28  7:22     ` Greg KH
2017-11-30  7:04       ` Mikulas Patocka
2017-11-30  8:07         ` Greg KH
2017-12-08 14:30           ` Pavel Machek [this message]
2017-12-08 14:56             ` Greg KH
2017-12-08 14:29       ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171208143018.GH7793@amd \
    --to=pavel@ucw.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.