public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/4] btrfs: scrub: make sctx->stripes[] a ring buffer
@ 2023-07-19  5:30 Qu Wenruo
  2023-07-19  5:30 ` [PATCH RFC 1/4] btrfs: scrub: move write back of repaired sectors into scrub_stripe_read_repair_worker() Qu Wenruo
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Qu Wenruo @ 2023-07-19  5:30 UTC (permalink / raw)
  To: linux-btrfs

!!! DO NOT MERGE !!!

This is the attempt to increase the queue depth of the scrub behavior.

Although it has a slight increase on the queue depth, it's not enough to
cause any obvious performance increase.

It's still short of 2GiB/s.

The patchset's idea is to avoid any unnecessary wait, by making
sctx->stripes[] a ring buffer, callers just grab the current slot and
queue the stripe.

The wait only happens when the current slot is still under scrub.

Unfrotauntely the benchmark doesn't help much, meaning the bottleneck is
not at the deidcated wait when the sctx->stripes[] are full.

Thus this patch is mostly sent asking for better ideas.

I'll try manually merging the read requests to see if we can get
anything better.

Qu Wenruo (4):
  btrfs: scrub: move write back of repaired sectors into
    scrub_stripe_read_repair_worker()
  btrfs: scrub: don't go ordered workqueue for dev-replace
  btrfs: scrub: use btrfs workqueue to synchronize the write back for
    dev-replace
  btrfs: scrub: make sctx->stripes[] array work as a ring buffer

 fs/btrfs/fs.h    |   2 +-
 fs/btrfs/scrub.c | 493 ++++++++++++++++++++++++-----------------------
 2 files changed, 249 insertions(+), 246 deletions(-)

-- 
2.41.0


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

end of thread, other threads:[~2023-07-28  3:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-19  5:30 [PATCH RFC 0/4] btrfs: scrub: make sctx->stripes[] a ring buffer Qu Wenruo
2023-07-19  5:30 ` [PATCH RFC 1/4] btrfs: scrub: move write back of repaired sectors into scrub_stripe_read_repair_worker() Qu Wenruo
2023-07-19  5:30 ` [PATCH RFC 2/4] btrfs: scrub: don't go ordered workqueue for dev-replace Qu Wenruo
2023-07-19  5:30 ` [PATCH RFC 3/4] btrfs: scrub: use btrfs workqueue to synchronize the write back " Qu Wenruo
2023-07-19  5:30 ` [PATCH RFC 4/4] btrfs: scrub: make sctx->stripes[] array work as a ring buffer Qu Wenruo
2023-07-28  3:15   ` kernel test robot
2023-07-19  6:34 ` [PATCH RFC 0/4] btrfs: scrub: make sctx->stripes[] " Martin Steigerwald
2023-07-19  6:44   ` Martin Steigerwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox