Re: [2.6 patch] fs/block_dev.c:I_BDEV() mustn't be inline

From: Sam Ravnborg
Date: Tue Apr 29 2008 - 04:16:51 EST


On Tue, Apr 29, 2008 at 11:06:31AM +0300, Adrian Bunk wrote:
> On Mon, Apr 28, 2008 at 05:41:11PM -0700, Linus Torvalds wrote:
> >...
> > > -inline struct block_device *I_BDEV(struct inode *inode)
> > > +struct block_device *I_BDEV(struct inode *inode)
> > > {
> > > return &BDEV_I(inode)->bdev;
> > > }
> >
> > There is NO WAY IN HELL this function shouldn't be inlined,
> >...
>
> Then CONFIG_OPTIMIZE_INLINING already broke it in your tree.

Can you please help me here.
Previously we said: gcc shall inline
Now we say: hi gcc - it is a good idea to inline this

But even without any inline annotation we would expect gcc
to inline it based on normal heuristics simply due to the
small size/footprint of the function.

So I cannot see how the CONFIG_OPTIMIZE_INLINING have any
effect here.
It all smells like a gcc bug to me.


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