All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: sandeen@sandeen.net, djwong@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCHSET 0/6] xfs_scrub: small performance tweaks
Date: Thu, 05 May 2022 09:07:41 -0700	[thread overview]
Message-ID: <165176686186.252160.2880340500532409944.stgit@magnolia> (raw)

Hi all,

Improve the performance of xfs_scrub when scrubbing file metadata by
using the file descriptor to issue scrub ioctls instead of scrubbing by
handle.  This saves us from having to do an untrusted iget (since we
have an open fd, we know the inode number is good) for every single
scrub invocation.  Surprisingly, this adds up to about a 3% reduction in
runtime for phase 3.

Second, if the filesystem doesn't require any repair work and scrub was
invoked in wet run (aka no -n) mode, then the only work for phase 4 is
to run FITRIM.  In this case, phase 4 can skip the precautionary
fscounter scan that we do before running metadata repairs since we'll do
that during phase 7.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=scrub-performance-tweaks
---
 scrub/phase3.c |  122 ++++++++++++++++++++++++++++++++++++++++----------------
 scrub/phase4.c |   55 ++++++++++++++++++++-----
 scrub/phase7.c |    2 -
 scrub/repair.c |   17 +++++++-
 scrub/repair.h |    6 +++
 scrub/scrub.c  |  120 ++++++++++++-------------------------------------------
 scrub/scrub.h  |   23 ++---------
 7 files changed, 185 insertions(+), 160 deletions(-)


             reply	other threads:[~2022-05-05 16:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 16:07 Darrick J. Wong [this message]
2022-05-05 16:07 ` [PATCH 1/6] xfs_scrub: collapse trivial file scrub helpers Darrick J. Wong
2022-05-12 20:49   ` Eric Sandeen
2022-05-05 16:07 ` [PATCH 2/6] xfs_scrub: in phase 3, use the opened file descriptor for scrub calls Darrick J. Wong
2022-05-12 20:52   ` Eric Sandeen
2022-05-05 16:07 ` [PATCH 3/6] xfs_scrub: fall back to scrub-by-handle if opening handles fails Darrick J. Wong
2022-05-12 20:58   ` Eric Sandeen
2022-05-05 16:08 ` [PATCH 4/6] xfs_scrub: don't try any file repairs during phase 3 if AG metadata bad Darrick J. Wong
2022-05-12 21:02   ` Eric Sandeen
2022-05-05 16:08 ` [PATCH 5/6] xfs_scrub: make phase 4 go straight to fstrim if nothing to fix Darrick J. Wong
2022-05-12 22:34   ` Eric Sandeen
2022-05-12 23:12     ` Darrick J. Wong
2022-05-13 13:18       ` Eric Sandeen
2022-05-13 15:32         ` Darrick J. Wong
2022-05-05 16:08 ` [PATCH 6/6] xfs_scrub: in phase 3, use the opened file descriptor for repair calls Darrick J. Wong
2022-05-12 21:06   ` Eric Sandeen

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=165176686186.252160.2880340500532409944.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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.