public inbox for linux-xfs@vger.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
Subject: Re: [PATCH 2/3] xfs: allow scrubbers to pause background reclaim
Date: Thu, 18 Apr 2019 08:45:55 +1000	[thread overview]
Message-ID: <20190417224555.GV29573@dread.disaster.area> (raw)
In-Reply-To: <20190417222953.GB5072@magnolia>

On Wed, Apr 17, 2019 at 03:29:53PM -0700, Darrick J. Wong wrote:
> On Thu, Apr 18, 2019 at 07:52:28AM +1000, Dave Chinner wrote:
> > On Tue, Apr 16, 2019 at 06:40:12PM -0700, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <darrick.wong@oracle.com>
> > > 
> > > The forthcoming summary counter patch races with regular filesystem
> > > activity to compute rough expected values for the counters.  This design
> > > was chosen to avoid having to freeze the entire filesystem to check the
> > > counters, but while that's running we'd prefer to minimize background
> > > reclamation activity to reduce the perturbations to the incore free
> > > block count.  Therefore, provide a way for scrubbers to disable
> > > background posteof and cowblock reclamation.
> > > 
> > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > > ---
> > >  fs/xfs/scrub/common.c |   18 ++++++++++++++++++
> > >  fs/xfs/scrub/common.h |    2 ++
> > >  fs/xfs/scrub/scrub.c  |    2 ++
> > >  fs/xfs/scrub/scrub.h  |    1 +
> > >  4 files changed, 23 insertions(+)
> > > 
> > > 
> > > diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
> > > index 7076d5c98151..a406a22a734f 100644
> > > --- a/fs/xfs/scrub/common.c
> > > +++ b/fs/xfs/scrub/common.c
> > > @@ -894,3 +894,21 @@ xchk_ilock_inverted(
> > >  	}
> > >  	return -EDEADLOCK;
> > >  }
> > > +
> > > +/* Pause background reclamation and inactivation. */
> > > +void
> > > +xchk_disable_reclaim(
> > > +	struct xfs_scrub	*sc)
> > > +{
> > > +	sc->flags |= XCHK_RECLAIM_DISABLED;
> > > +	xfs_icache_disable_reclaim(sc->mp);
> > > +}
> > 
> > Hmmm. Poorly named function.  "reclaim" in the context of
> > xfs_icache.c means inode cache reclaim...
> > 
> > We're not actually disabling inode reclaim here, we
> > are disabling background block reaping.
> > 
> > Can we change this all to be named more appropriately (including the
> > icache.c functions? Then it is all fine because I don't look at
> > it and think "that'll break under memory pressure"....
> 
> Ah, reaping!  That's the word I was looking for. :(
> 
> xfs_icache_disable_speculative_reaping
> xchk_disable_speculative_reaping

disable_block_reaping?

but, really, purple or pink at this point...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2019-04-17 22:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17  1:40 [PATCH 0/3] xfs: scrub filesystem summary counters Darrick J. Wong
2019-04-17  1:40 ` [PATCH 1/3] xfs: track delayed allocation reservations across Darrick J. Wong
2019-04-17 21:40   ` Dave Chinner
2019-04-18  0:07     ` Darrick J. Wong
2019-04-17  1:40 ` [PATCH 2/3] xfs: allow scrubbers to pause background reclaim Darrick J. Wong
2019-04-17 21:52   ` Dave Chinner
2019-04-17 22:29     ` Darrick J. Wong
2019-04-17 22:45       ` Dave Chinner [this message]
2019-04-17  1:40 ` [PATCH 3/3] xfs: add online scrub/repair for superblock counters Darrick J. Wong
2019-04-17 22:30   ` Dave Chinner
2019-04-18  0:32     ` Darrick J. Wong
2019-04-18 23:39     ` 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=20190417224555.GV29573@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox