Re: [PATCH] split xfs_ioc_xattr

David Chinner
2008-04-16T06:37:17Z

On Wed, Apr 16, 2008 at 01:47:13PM +1000, Niv Sardi wrote:
> Christoph Hellwig <hch@lst.de> writes:
>
> > On Mon, Apr 14, 2008 at 01:14:47PM +1000, Niv Sardi wrote:
> >>
> >>
> >> Christoph Hellwig <hch@lst.de> writes:
> >> > The three subcases of xfs_ioc_xattr don't share any semantics and almost
> >> > no code, so split it into three separate helpers.
> >> >
> >> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> >>
> >> Looks good to me, aren't the likely() unlinkely() deprecated ? shouldn't
> >> they be killed ?
> >
> > Why would they be deprecated?
>
> just an impression I had from on of Dave's comment to one of my patches:
> Â« Can we kill all the likely() crap out of here? Modern hardware
> branch predictors are far better than static prediction hints. Â»

And the context which you haven't quoted? A repugnant hunk of code
with one broken use of likely() in two unnecessary 'if
(likely(!error) ...' branches, and 20 lines of my comment after the
above quote demonstrating of how to restructure it so it was neater,
faster and didn't need the prediction hints at all.

Cheers,

Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group