linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] xfs: defer agfl block frees
@ 2018-04-10 17:46 Brian Foster
  2018-04-10 17:46 ` [PATCH 1/7] xfs: create agfl block free helper function Brian Foster
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Brian Foster @ 2018-04-10 17:46 UTC (permalink / raw)
  To: linux-xfs

Hi all,

Here's a non-rfc version of the defer AGFL frees patches. As a quick
summary, the purpose of this series is to reduce per-tx log reservation
consumption of the block allocation code. Under certain conditions, the
pre-allocation AGFL fix up code can end up performing multiple block
free operations that can result in multiple btree shape changes before
the originally requested allocation even begins. This leads to log
reservation overrun problems because the number of AGFL block frees
required for a particular transaction cannot be determined in advance.
Therefore, process frees of AGFL blocks using deferred operations in the
same way that data blocks are freed.

In conjunction, clean up some of the disparate dfops callchain plumbing
by allowing a transaction to carry a pointer to an associated dop
structure. This eliminates the need to plumb xfs_defer_ops through yet
another callchain for the purpose of deferring AGFL frees. It also
facilitates cleanups of similar codepaths where dfops is already passed
around separately from the transaction that will ultimately log the
associated intents.

There aren't that many code changes since rfcv2. The series has been
rebased to for-next and the assignment of ->t_dfops occurs within
xfs_defer_init() rather than being open-coded. Also, the series has seen
more testing and drops some of the related test code from the rfc.

Thoughts, reviews, flames appreciated.

Brian

v1:
- Rebased to for-next.
- Attach dfops to tp via xfs_defer_init().
- Fix up xfs_defer_finish() to restore original pointer.
- Dropped debug/test patches.
rfcv2: https://marc.info/?l=linux-xfs&m=151681946702093&w=2
- Use transaction to carry deferred ops struct to allocation context.
- Remove dfops param from dir interfaces where possible.
- Defer AGFL block frees from more contexts.
- Define runtime stat for transaction regrant and logcount patch (to be
  potentially removed).
rfcv1: https://marc.info/?l=linux-xfs&m=151267309423883&w=2

Brian Foster (7):
  xfs: create agfl block free helper function
  xfs: allow attach of dfops to transaction
  xfs: defer agfl block frees when dfops is available
  xfs: defer agfl block frees from deferred ops processing context
  xfs: defer agfl frees from inode inactivation
  xfs: defer frees from common inode allocation paths
  xfs: defer agfl frees from directory op transactions

 fs/xfs/libxfs/xfs_alloc.c       | 82 +++++++++++++++++++++++++++++++++++------
 fs/xfs/libxfs/xfs_alloc.h       |  2 +
 fs/xfs/libxfs/xfs_attr.c        | 18 ++++-----
 fs/xfs/libxfs/xfs_attr_remote.c |  6 +--
 fs/xfs/libxfs/xfs_bmap.c        |  4 +-
 fs/xfs/libxfs/xfs_defer.c       | 17 ++++++++-
 fs/xfs/libxfs/xfs_defer.h       |  4 +-
 fs/xfs/libxfs/xfs_dir2.c        | 16 ++++----
 fs/xfs/libxfs/xfs_dir2.h        |  9 ++---
 fs/xfs/libxfs/xfs_ialloc.c      |  6 +--
 fs/xfs/libxfs/xfs_ialloc.h      |  1 -
 fs/xfs/libxfs/xfs_refcount.c    |  2 +-
 fs/xfs/xfs_bmap_util.c          | 12 +++---
 fs/xfs/xfs_dquot.c              |  2 +-
 fs/xfs/xfs_inode.c              | 76 +++++++++++++++++++-------------------
 fs/xfs/xfs_inode.h              |  3 +-
 fs/xfs/xfs_iomap.c              |  6 +--
 fs/xfs/xfs_log_recover.c        |  2 +-
 fs/xfs/xfs_reflink.c            |  8 ++--
 fs/xfs/xfs_rtalloc.c            |  2 +-
 fs/xfs/xfs_symlink.c            |  6 +--
 fs/xfs/xfs_trace.h              |  2 +
 fs/xfs/xfs_trans.c              | 11 ++++--
 fs/xfs/xfs_trans.h              |  1 +
 fs/xfs/xfs_trans_extfree.c      | 70 +++++++++++++++++++++++++++++++++++
 25 files changed, 259 insertions(+), 109 deletions(-)

-- 
2.13.6


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-04-16 13:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-10 17:46 [PATCH 0/7] xfs: defer agfl block frees Brian Foster
2018-04-10 17:46 ` [PATCH 1/7] xfs: create agfl block free helper function Brian Foster
2018-04-15  7:38   ` Christoph Hellwig
2018-04-10 17:46 ` [PATCH 2/7] xfs: allow attach of dfops to transaction Brian Foster
2018-04-15  7:44   ` Christoph Hellwig
2018-04-16 13:33     ` Brian Foster
2018-04-10 17:46 ` [PATCH 3/7] xfs: defer agfl block frees when dfops is available Brian Foster
2018-04-15  7:46   ` Christoph Hellwig
2018-04-16 13:42     ` Brian Foster
2018-04-10 17:46 ` [PATCH 4/7] xfs: defer agfl block frees from deferred ops processing context Brian Foster
2018-04-10 17:46 ` [PATCH 5/7] xfs: defer agfl frees from inode inactivation Brian Foster
2018-04-10 17:46 ` [PATCH 6/7] xfs: defer frees from common inode allocation paths Brian Foster
2018-04-10 17:46 ` [PATCH 7/7] xfs: defer agfl frees from directory op transactions Brian Foster

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).