public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Richard Weinberger <richard@nod.at>, Li RongQing <roy.qing.li@gmail.com>
Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
	fabf@skynet.be, jkosina@suse.cz,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	oleg@redhat.com, akpm@linux-foundation.org
Subject: Re: [RFC][PATCH] signal: replace !likely with unlikely!
Date: Sat, 13 Sep 2014 06:28:18 -0700	[thread overview]
Message-ID: <54144672.9060807@roeck-us.net> (raw)
In-Reply-To: <541416AB.7000808@nod.at>

On 09/13/2014 03:04 AM, Richard Weinberger wrote:
> Am 13.09.2014 04:48, schrieb Li RongQing:
>> I did not test, how to test it?
>
> Compare the object files of both variants to find out whether both create
> semantically equivalent code and whether the un/likely have an effect.
> i.e. objdump -S -d kernel/signal.o
> I guess you can just remove the likely as gcc is smart enough to detect the "goto ret;"
> as an unlikely taken branch.
>
Or just write similar test code and observe the result.

When you are doing that, you might learn that if "(!likely(expression))"
is _not_ the same as "if (unlikely(!expression))".

Guenter


      reply	other threads:[~2014-09-13 13:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  0:48 [RFC][PATCH] signal: replace !likely with unlikely! roy.qing.li
2014-09-11 19:18 ` Guenter Roeck
2014-09-13  2:48   ` Li RongQing
2014-09-13 10:04     ` Richard Weinberger
2014-09-13 13:28       ` Guenter Roeck [this message]

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=54144672.9060807@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akpm@linux-foundation.org \
    --cc=fabf@skynet.be \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=richard@nod.at \
    --cc=roy.qing.li@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox