From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758183AbbEFEiK (ORCPT ); Wed, 6 May 2015 00:38:10 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:42639 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752476AbbEFEiI (ORCPT ); Wed, 6 May 2015 00:38:08 -0400 Date: Tue, 5 May 2015 21:38:07 -0700 From: Christoph Hellwig To: Dave Chinner Cc: xfs@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] xfs: inode counter needs to use __percpu_counter_compare Message-ID: <20150506043807.GB10940@infradead.org> References: <1430863299-9341-1-git-send-email-david@fromorbit.com> <1430863299-9341-3-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430863299-9341-3-git-send-email-david@fromorbit.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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. Otherwise looks fine.