linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH RFC 0/4] xfs: defer agfl block frees
Date: Thu,  7 Dec 2017 13:58:06 -0500	[thread overview]
Message-ID: <20171207185810.48757-1-bfoster@redhat.com> (raw)

Hi all,

This is an experiment I've been hacking on based on some of the recent
discussions around log reservation deficiences due to unpredictable AGFL
fixup behavior[1] and a previous attempt to address the problem[2].

This RFC series introduces the ability to defer AGFL block frees much
like the way we already defer frees of file-mapped extents. The intent
is to disconnect freeing of surplus AGFL blocks from making those free
AGFL slots available for an impending allocation. In turn, this creates
conditions where AGFL fixups have more consistent and predictable log
reservation consumption. AGFL block allocation behavior does not change
since most AGFL deficiences can be satisfied by a single allocation
request (whereas AGFL blocks are generally freed one at a time,
requiring multiple cycles through the allocator).

This series survives the overrun reproducer associated with [1], even
without the transaction fixups in [3] (that also work around the
overrun). It also survives an xfstests run without any obvious problems.

This is RFC for a few reasons. First, this is obviously a sensitive area
of code that requires thorough analysis. This also requires more
thorough stress testing than it has seen so far. Finally, the behavior
changes are intentionally limited to target the reproducer workload. A
proper series should probably include updates to consistently defer AGFL
block frees from all possible inobt contexts, for example. I'm not so
sure that is necessary/appropriate for other allocator callers, however,
but is worth consideration.

Thoughts, reviews, flames appreciated.

Brian

[1] https://marc.info/?l=linux-xfs&m=151127676203410&w=2
[2] https://marc.info/?l=linux-xfs&m=151181428131889&w=2
[3] https://marc.info/?l=linux-xfs&m=151206831911206&w=2

Brian Foster (4):
  xfs: create agfl block free helper function
  xfs: defer agfl block frees when dfops is available
  xfs: defer agfl block frees on extent frees
  xfs: defer agfl frees on inobt allocs during chunk removal

 fs/xfs/libxfs/xfs_alloc.c          | 91 ++++++++++++++++++++++++++++++++------
 fs/xfs/libxfs/xfs_alloc.h          |  8 +++-
 fs/xfs/libxfs/xfs_defer.h          |  1 +
 fs/xfs/libxfs/xfs_ialloc.c         | 16 +++----
 fs/xfs/libxfs/xfs_ialloc_btree.c   | 11 +++--
 fs/xfs/libxfs/xfs_ialloc_btree.h   |  4 +-
 fs/xfs/libxfs/xfs_refcount_btree.c |  2 +-
 fs/xfs/libxfs/xfs_rmap.c           |  2 +-
 fs/xfs/scrub/common.c              |  8 ++--
 fs/xfs/xfs_extfree_item.c          |  2 +-
 fs/xfs/xfs_fsops.c                 |  2 +-
 fs/xfs/xfs_itable.c                |  4 +-
 fs/xfs/xfs_trace.h                 |  2 +
 fs/xfs/xfs_trans.h                 |  3 +-
 fs/xfs/xfs_trans_extfree.c         | 77 ++++++++++++++++++++++++++++++--
 15 files changed, 189 insertions(+), 44 deletions(-)

-- 
2.13.6


             reply	other threads:[~2017-12-07 18:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 18:58 Brian Foster [this message]
2017-12-07 18:58 ` [PATCH RFC 1/4] xfs: create agfl block free helper function Brian Foster
2017-12-07 22:24   ` Dave Chinner
2017-12-07 18:58 ` [PATCH RFC 2/4] xfs: defer agfl block frees when dfops is available Brian Foster
2017-12-07 22:41   ` Dave Chinner
2017-12-07 22:54     ` Dave Chinner
2017-12-08 14:17       ` Brian Foster
2017-12-08 14:16     ` Brian Foster
2018-01-08 21:56       ` Brian Foster
2018-01-09 20:43         ` Darrick J. Wong
2018-01-10 12:58           ` Brian Foster
2018-01-10 19:08             ` Darrick J. Wong
2018-01-10 20:32               ` Brian Foster
2017-12-07 18:58 ` [PATCH RFC 3/4] xfs: defer agfl block frees on extent frees Brian Foster
2017-12-07 22:49   ` Dave Chinner
2017-12-08 14:20     ` Brian Foster
2017-12-07 18:58 ` [PATCH RFC 4/4] xfs: defer agfl frees on inobt allocs during chunk removal Brian Foster

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=20171207185810.48757-1-bfoster@redhat.com \
    --to=bfoster@redhat.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;
as well as URLs for NNTP newsgroup(s).