LKML Archive on
help / color / mirror / Atom feed
From: Arjan van de Ven <>
To: Andrew Morton <>
Cc: "Luiz Fernando N. Capitulino" <>,
Subject: Re: PATCH: __bprm_mm_init(): remove uneeded goto
Date: Tue, 4 Nov 2008 18:48:54 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Tue, 4 Nov 2008 11:47:03 -0800
Andrew Morton <> wrote:

> We used to do this trick a *lot* in the kernel (back in the 2.2 days?)
> for this performance reason.  Nowdays gcc is a lot more complex and we
> hope that it can sometimes work these things out for itself and we
> hope that `unlikely' might cause the compiler to move the unlikely
> code out of line.  But I don't know how successful the compiler is at
> doing this, and it'll be dependent upon the gcc version, the wind
> direction, etc.

as far as I know, gcc tends to consider NULL pointer checks as unlikely
by default.

(but we can always tell it so if we think we know better..)

Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 

      reply	other threads:[~2008-11-05  2:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 16:03 Luiz Fernando N. Capitulino
2008-11-04 18:57 ` Andrew Morton
2008-11-04 19:14   ` Luiz Fernando N. Capitulino
2008-11-04 19:47     ` Andrew Morton
2008-11-05  2:48       ` Arjan van de Ven [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:

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

  git send-email \ \ \ \ \ \
    --subject='Re: PATCH: __bprm_mm_init(): remove uneeded goto' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).