xfs
[Top] [All Lists]

Re: [PATCH 5/9] xfs: user per-cpu stats for the total dquot numbers

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 5/9] xfs: user per-cpu stats for the total dquot numbers
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 16 Feb 2012 11:02:43 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120215023147.612027782@xxxxxxxxxxxxxxxxxxxxxx>
References: <20120215022926.577682146@xxxxxxxxxxxxxxxxxxxxxx> <20120215023147.612027782@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Feb 14, 2012 at 09:29:31PM -0500, Christoph Hellwig wrote:
> Switch the total number of dquots counter over to use the per-cpu stats
> implementation, and reintroduce the number of unused dquots counter
> dropped earlier in the series.
> 
> Btw, I wonder if we should simply add these counters to /proc/fs/xfs/xqmstat
> instead of keeping the odd format and mostly superflous /proc/fs/xfs/xqm
> around.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> ---
>  fs/xfs/xfs_dquot.c    |    7 ++++---
>  fs/xfs/xfs_qm.c       |    3 ++-
>  fs/xfs/xfs_qm.h       |    1 -
>  fs/xfs/xfs_qm_stats.c |    4 ++--
>  fs/xfs/xfs_qm_stats.h |    5 +++++
>  5 files changed, 13 insertions(+), 7 deletions(-)
> 
> Index: xfs/fs/xfs/xfs_qm_stats.c
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_qm_stats.c    2012-02-12 13:22:45.040270187 -0800
> +++ xfs/fs/xfs/xfs_qm_stats.c 2012-02-12 13:22:49.553603603 -0800
> @@ -52,9 +52,9 @@ static int xqm_proc_show(struct seq_file
>       /* maximum; incore; ratio free to inuse; freelist */
>       seq_printf(m, "%d\t%d\t%d\t%u\n",
>                       0,
> -                     xfs_Gqm? atomic_read(&xfs_Gqm->qm_totaldquots) : 0,
> +                     xqmstats_sum(XQMSTAT_END_XQMSTAT),
>                       0,
> -                     0);
> +                     xqmstats_sum(XQMSTAT_END_XQMSTAT + 1));
>       return 0;
>  }
>  
> Index: xfs/fs/xfs/xfs_qm_stats.h
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_qm_stats.h    2012-02-12 13:22:45.040270187 -0800
> +++ xfs/fs/xfs/xfs_qm_stats.h 2012-02-12 13:22:49.553603603 -0800
> @@ -33,6 +33,9 @@ struct xqmstats {
>       __uint32_t              xs_qm_dqshake_reclaims;
>       __uint32_t              xs_qm_dqinact_reclaims;
>  #define XQMSTAT_END_XQMSTAT  8
> +     __uint32_t              xs_qm_dquots;
> +     __uint32_t              xs_qm_dquots_unused;
> +#define XQMSTAT_END_XQM              (XQMSTAT_END_XQMSTAT + 4)

Shouldn't that be (XQMSTAT_END_XQMSTAT + 2)?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>