xfs
[Top] [All Lists]

Re: [PATCH] split xfs_ioc_xattr

To: David Chinner <dgc@xxxxxxx>
Subject: Re: [PATCH] split xfs_ioc_xattr
From: Timothy Shimmin <tes@xxxxxxx>
Date: Wed, 16 Apr 2008 17:06:49 +1000
Cc: Niv Sardi <xaiki@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20080416063712.GN108924158@xxxxxxx>
References: <20080319204014.GA23644@xxxxxx> <ncciqylf7q0.fsf@xxxxxxx> <20080414032940.GA10579@xxxxxx> <ncclk3ejwam.fsf@xxxxxxx> <20080416063712.GN108924158@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)
David Chinner wrote:
On Wed, Apr 16, 2008 at 01:47:13PM +1000, Niv Sardi wrote:
Christoph Hellwig <hch@xxxxxx> writes:

On Mon, Apr 14, 2008 at 01:14:47PM +1000, Niv Sardi wrote:

Christoph Hellwig <hch@xxxxxx> 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@xxxxxx>
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.


I'm still wondering if likely() and unlikely() should ever be used or not?

--Tim


<Prev in Thread] Current Thread [Next in Thread>