From: Dave Chinner <david@fromorbit.com>
To: Mark Tinguely <tinguely@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: active inodes stat is broken
Date: Wed, 3 Dec 2014 08:02:04 +1100 [thread overview]
Message-ID: <20141202210204.GA18131@dastard> (raw)
In-Reply-To: <547DC411.3090202@sgi.com>
On Tue, Dec 02, 2014 at 07:52:17AM -0600, Mark Tinguely wrote:
> On 12/01/14 16:34, Dave Chinner wrote:
> >From: Dave Chinner<dchinner@redhat.com>
> >
> >vn_active only ever gets decremented, so it has a very large
> >negative number. Make it track the inode count we currently have
> >allocated properly so we can easily track the size of the inode
> >cache via tools like PCP.
> >
> >Signed-off-by: Dave Chinner<dchinner@redhat.com>
> >---
> > fs/xfs/xfs_icache.c | 3 +++
> > fs/xfs/xfs_super.c | 1 -
> > 2 files changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
> >index 92ca910..8bc3d78 100644
> >--- a/fs/xfs/xfs_icache.c
> >+++ b/fs/xfs/xfs_icache.c
> >@@ -128,6 +128,7 @@ xfs_inode_free(
> > /* asserts to verify all state is correct here */
> > ASSERT(atomic_read(&ip->i_pincount) == 0);
> > ASSERT(!xfs_isiflocked(ip));
> >+ XFS_STATS_DEC(vn_active);
> >
> > call_rcu(&VFS_I(ip)->i_rcu, xfs_inode_free_callback);
> > }
>
> Would the inode allocated and freed in xfs_recover_inode_owner_change()
> cause this the count to go negative?
Good catch - it will. Recovering swap extent operations is pretty
rare, so I wouldn't have noticed an off-by-one-or-two on a normal
system where there are several thousand allocated and cached inodes
even at idle. I'll fix it.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-12-02 21:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 22:34 [PATCH] xfs: active inodes stat is broken Dave Chinner
2014-12-02 13:52 ` Mark Tinguely
2014-12-02 21:02 ` Dave Chinner [this message]
2014-12-02 22:34 ` [PATCH v2] " Dave Chinner
2014-12-02 22:45 ` Mark Tinguely
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=20141202210204.GA18131@dastard \
--to=david@fromorbit.com \
--cc=tinguely@sgi.com \
--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.