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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux