From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 18C0D7F37 for ; Wed, 6 May 2015 00:45:56 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay2.corp.sgi.com (Postfix) with ESMTP id F1E35304032 for ; Tue, 5 May 2015 22:45:52 -0700 (PDT) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by cuda.sgi.com with ESMTP id nwto6P8ZBut0vN5Y for ; Tue, 05 May 2015 22:45:50 -0700 (PDT) Date: Wed, 6 May 2015 15:45:44 +1000 From: Dave Chinner Subject: Re: [PATCH 2/2] xfs: inode counter needs to use __percpu_counter_compare Message-ID: <20150506054544.GB4327@dastard> References: <1430863299-9341-1-git-send-email-david@fromorbit.com> <1430863299-9341-3-git-send-email-david@fromorbit.com> <20150506043807.GB10940@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150506043807.GB10940@infradead.org> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, xfs@oss.sgi.com 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@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753566AbbEFFpw (ORCPT ); Wed, 6 May 2015 01:45:52 -0400 Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:36269 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751747AbbEFFpv (ORCPT ); Wed, 6 May 2015 01:45:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2D+BwDvqUlVPH8+LHlcgwyBL4ZLrVABAQaZRQQCAoE2TQEBAQEBAQcBAQEBQT+EIQEBBCcTHCMQCAMOCgklDwUlAwcaE4grxB4BAQEBAQUCAR8YhX+FIoUFB4MXgRYBBI9ujQSMUolegQODJiwxgkUBAQE Date: Wed, 6 May 2015 15:45:44 +1000 From: Dave Chinner To: Christoph Hellwig 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: <20150506054544.GB4327@dastard> References: <1430863299-9341-1-git-send-email-david@fromorbit.com> <1430863299-9341-3-git-send-email-david@fromorbit.com> <20150506043807.GB10940@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150506043807.GB10940@infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@fromorbit.com