Re: [PATCH 4/8 v2] xfs: use common code for quota statistics

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

 



Hey guys,

On 14 March 2012 08:40, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
On Tue, Mar 13, 2012 at 10:27:48AM -0500, Ben Myers wrote:
> On Tue, Mar 13, 2012 at 04:42:42AM -0400, Christoph Hellwig wrote:
> > On Mon, Mar 12, 2012 at 12:55:19PM -0500, Ben Myers wrote:
> > > > +static int xqm_proc_show(struct seq_file *m, void *v)
> > > > +{
> > > > +       /* maximum; incore; ratio free to inuse; freelist */
> > > > +       seq_printf(m, "%d\t%d\t%d\t%u\n",
> > > > +                       0,
> > > > +                       counter_val(XFSSTAT_END_XQMSTAT),
> > >
> > > This patch looks great.  It might break some PCP scripts, I'm not sure.
> >
> > Why would it break them?  The existing stats are still kept around, and
> > new additions to the main stats file are expected to happen once in a
> > while.
>
> I'm not sure that it would.  You've added a line to the common stats
> procfile, and the pmda might expect the xpc line immediately after ibt2.

In an amusing twist, it turns out that the quota stats were originally part of
the main procfs stats file and were later on moved into their own file as
part of making xqm modular.  So, by good fortune PCP already supports
a move back into the original stats file for these stats, provided the same
prefix ("qm") is used.
 

IIRC the pmda triggers off the descriptor at the start of the line.

That's correct.
 
It ignores lines that it doesn't understand the descriptor for (like
all the v2 btree stats). I should probably update the pmda fo all
those stats....

That was done quite awhile back (mid-2010), unless there's some other
stats come along since then that I don't know about yet?  (are these the
ones you mean, Dave?...)

$ egrep '^[a-z]+2 ' /proc/fs/xfs/stat
abtb2 4769967 54332939 635853 643428 507 508 282413 22672 61298 45587 1093 1111 1600 1619 393677507
abtc2 10166604 113971561 4264119 4272402 1213 1214 77487 9464 29584 35760 1551 1571 2764 2785 1438715558
bmbt2 152523 1231148 52950 42558 0 0 1372 1385 5117 1340 85 48 85 48 1545160
ibt2 9475130 102652889 5672 2878 0 0 6549337 15214 801 869 17 0 17 0 1202730
$

( those are the xfs.btree.alloc_blocks.*, xfs.btree.alloc_contig.*,
xfs.btree.block_map.*, and xfs.btree.inode.lookup.* metrics )

cheers.

--
Nathan
_______________________________________________
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