From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kok, Auke" Subject: Re: [PATCH 10/25] Unionfs: add un/likely conditionals on copyup ops Date: Tue, 25 Sep 2007 21:32:44 -0700 Message-ID: <46F9E0EC.3010105@intel.com> References: <11907762042481-git-send-email-ezk@cs.sunysb.edu> <11907762093928-git-send-email-ezk@cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk, hch@infradead.org To: Erez Zadok Return-path: Received: from vms046pub.verizon.net ([206.46.252.46]:41237 "EHLO vms046pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbXIZEdB (ORCPT ); Wed, 26 Sep 2007 00:33:01 -0400 In-reply-to: <11907762093928-git-send-email-ezk@cs.sunysb.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Erez Zadok wrote: > Signed-off-by: Erez Zadok > --- > fs/unionfs/copyup.c | 102 +++++++++++++++++++++++++------------------------- > 1 files changed, 51 insertions(+), 51 deletions(-) > > diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c > index 23ac4c8..e3c5f15 100644 > --- a/fs/unionfs/copyup.c > +++ b/fs/unionfs/copyup.c > @@ -36,14 +36,14 @@ static int copyup_xattrs(struct dentry *old_lower_dentry, > > /* query the actual size of the xattr list */ > list_size = vfs_listxattr(old_lower_dentry, NULL, 0); > - if (list_size <= 0) { > + if (unlikely(list_size <= 0)) { I've been told several times that adding these is almost always bogus - either it messes up the CPU branch prediction or the compiler/CPU just does a lot better at finding the right way without these hints. Adding them as a blanket seems rather strange. Have you got any numbers that this really improves performance? Auke