Re: PATCH: __bprm_mm_init(): remove uneeded goto

From: Arjan van de Ven
Date: Tue Nov 04 2008 - 21:48:34 EST


On Tue, 4 Nov 2008 11:47:03 -0800
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> 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,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/