Re: [PATCH] ext3_clear_inode(): avoid kfree(NULL)

From: Steven Rostedt
Date: Sat Jun 24 2006 - 08:50:44 EST



On Sat, 24 Jun 2006, Arjan van de Ven wrote:

> > >
> > > in general, a function call is 100% predictable without any real control
> > > flow dependencies for the processor, and thus there is no real issue in
> > > the execution pipeline. An if is a conditional branch, which breaks up
> > > the execution pipeline if mispredicted...
> >
> > But doesn't the unlikely help the prediction?
>
> nope none at all, at least not on x86/x86-64.
> (in fact there is no way to help the prediction on those architectures
> that actually works)
>

But doesn't gcc optimize it. That is, it puts the code in the if block
as the jump. So if you never take the if, the pipeline is not hurt.

-- Steve

-
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/