All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH] [RFC] xfs: make xfs btree stats less huge
Date: Tue, 20 Sep 2016 15:59:45 +1000	[thread overview]
Message-ID: <20160920055945.GG340@dastard> (raw)
In-Reply-To: <20160920041652.GK9314@birch.djwong.org>

On Mon, Sep 19, 2016 at 09:16:52PM -0700, Darrick J. Wong wrote:
> On Tue, Sep 13, 2016 at 06:28:42PM +1000, Dave Chinner wrote:
> > -	__uint32_t		xs_rmap_2_decrement;
> > -	__uint32_t		xs_rmap_2_lshift;
> > -	__uint32_t		xs_rmap_2_rshift;
> > -	__uint32_t		xs_rmap_2_split;
> > -	__uint32_t		xs_rmap_2_join;
> > -	__uint32_t		xs_rmap_2_alloc;
> > -	__uint32_t		xs_rmap_2_free;
> > -	__uint32_t		xs_rmap_2_moves;
> > +#define XFSSTAT_END_ABTB_V2		(XFSSTAT_END_BUF+__XBTS_MAX)
> > +	__uint32_t		xs_abtb_2[__XBTS_MAX];
> > +#define XFSSTAT_END_ABTC_V2		(XFSSTAT_END_ABTB_V2+__XBTS_MAX)
> > +	__uint32_t		xs_abtc_2[__XBTS_MAX];
> > +#define XFSSTAT_END_BMBT_V2		(XFSSTAT_END_ABTC_V2+__XBTS_MAX)
> > +	__uint32_t		xs_bmbt_2[__XBTS_MAX];
> > +#define XFSSTAT_END_IBT_V2		(XFSSTAT_END_BMBT_V2+__XBTS_MAX)
> > +	__uint32_t		xs_ibt_2[__XBTS_MAX];
> > +#define XFSSTAT_END_FIBT_V2		(XFSSTAT_END_IBT_V2+__XBTS_MAX)
> > +	__uint32_t		xs_fibt_2[__XBTS_MAX];
> > +#define XFSSTAT_END_RMAP_V2		(XFSSTAT_END_FIBT_V2+__XBTS_MAX)
> > +	__uint32_t		xs_rmap_2[__XBTS_MAX];
> 
> Are you planning to merge this before or after the refcount btree?

Doesn't matter - either way I'll fix up one of them on merge into
the for-next tree...

> 
> >  #define XFSSTAT_END_XQMSTAT		(XFSSTAT_END_RMAP_V2+6)
> >  	__uint32_t		xs_qm_dqreclaims;
> >  	__uint32_t		xs_qm_dqreclaim_misses;
> > @@ -229,26 +165,58 @@ struct xfsstats {
> >  	__uint64_t		xs_read_bytes;
> >  };
> >  
> > +struct xfsstats {
> > +	union {
> > +		struct __xfsstats	s;
> > +		uint32_t		a[XFSSTAT_END_XQMSTAT];
> > +	};
> 
> /me wonders if there ought to be a build time check to make sure that
> these two are really the same size?  They look all right as is, but
> I can see myself forgetting to change something and screwing it up. :(

It isn't the same size, because struct __xfsstats has three u64
stats at the end that aren't part of the u32 array indexed by
XFSSTAT_END_XQMSTAT. If we get the calculation of
XFSSTAT_END_XQMSTAT wrong , then the output of the stats in the proc
and sysfs files is screwed up because it treats the stats as an
array of u32 items of that same size.  So it's fairly obvious when
it gets broken...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2016-09-20  6:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  8:28 [PATCH] [RFC] xfs: make xfs btree stats less huge Dave Chinner
2016-09-13  9:06 ` Carlos Maiolino
2016-09-13 21:15   ` Dave Chinner
2016-09-19 23:49 ` Dave Chinner
2016-09-20  4:16 ` Darrick J. Wong
2016-09-20  5:59   ` Dave Chinner [this message]
2016-09-20  6:10     ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160920055945.GG340@dastard \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.