Skip to content

RFC btrfs: scrub: make sctx->stripes[] a ring buffer

Qu Wenruo linux-btrfs oe-lkp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4btrfs: scrub: move write back of repaired sectors into scrub_stripe_read_repair_worker()fs/btrfs/scrub.c+126 -1300 replies
2/4btrfs: scrub: don't go ordered workqueue for dev-replacefs/btrfs/scrub.c+3 -70 replies
3/4btrfs: scrub: use btrfs workqueue to synchronize the write back for dev-replacefs/btrfs/fs.h fs/btrfs/scrub.c+100 -950 replies
4/4btrfs: scrub: make sctx->stripes[] array work as a ring bufferfs/btrfs/scrub.c+22 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/4] btrfs: scrub: make sctx->stripes[] a ring buffer

!!! 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(-)
Signature · 1 line
2.41.0