| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2/2] xfs: inode counter needs to use __percpu_counter_compare |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Wed, 6 May 2015 15:45:44 +1000 |
| Cc: | xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20150506043807.GB10940@xxxxxxxxxxxxx> |
| References: | <1430863299-9341-1-git-send-email-david@xxxxxxxxxxxxx> <1430863299-9341-3-git-send-email-david@xxxxxxxxxxxxx> <20150506043807.GB10940@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Tue, May 05, 2015 at 09:38:07PM -0700, Christoph Hellwig wrote:
> > diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> > index 02f827f..900f8ce 100644
> > --- a/fs/xfs/xfs_mount.c
> > +++ b/fs/xfs/xfs_mount.c
> > @@ -1106,8 +1106,9 @@ xfs_mod_icount(
> > int64_t delta)
> > {
> > /* deltas are +/-64, hence the large batch size of 128. */
> > - __percpu_counter_add(&mp->m_icount, delta, 128);
> > - if (percpu_counter_compare(&mp->m_icount, 0) < 0) {
> > +#define _ICOUNT_BATCH 128
> > + __percpu_counter_add(&mp->m_icount, delta, _ICOUNT_BATCH);
>
> Can you give XFS_ prefixes to the atch sizes and move them otuside the
> function? And fix up the instance in xfs_mod_fdblocks as well while
> you're at it.
Sure.
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 1/2] percpu_counter: batch size aware __percpu_counter_compare(), Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH 1/2] percpu_counter: batch size aware __percpu_counter_compare(), Dave Chinner |
| Previous by Thread: | Re: [PATCH 2/2] xfs: inode counter needs to use __percpu_counter_compare, Christoph Hellwig |
| Next by Thread: | [PATCH 1/2] percpu_counter: batch size aware __percpu_counter_compare(), Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |