linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Andrew Morton <akpm@osdl.org>,
	viro@ftp.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH 1/4] hugetlbfs: move free_inodes accounting
Date: Wed, 21 Sep 2005 12:34:57 -0700	[thread overview]
Message-ID: <1127331297.10664.6.camel@localhost> (raw)
In-Reply-To: <20050921092156.GA22544@lst.de>

On Wed, 2005-09-21 at 11:21 +0200, Christoph Hellwig wrote:
> +static inline int hugetlbfs_inc_free_inodes(struct hugetlbfs_sb_info
> *sbinfo)
> +{
> +       if (sbinfo->free_inodes >= 0) {
> +               spin_lock(&sbinfo->stat_lock);
> +               if (unlikely(!sbinfo->free_inodes)) {
> +                       spin_unlock(&sbinfo->stat_lock);
> +                       return 0;
> +               }
> +               sbinfo->free_inodes--;
> +               spin_unlock(&sbinfo->stat_lock);
> +       }

Does that really need the unlikely()?  Doesn't seem horribly performance
critical.  

-- Dave


  parent reply	other threads:[~2005-09-21 19:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-21  9:21 [PATCH 1/4] hugetlbfs: move free_inodes accounting Christoph Hellwig
2005-09-21 19:10 ` Andrew Morton
2005-09-21 19:34 ` Dave Hansen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-09-22  6:37 Chen, Kenneth W

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1127331297.10664.6.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).