mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/4] dm zoned: fix idle reclaim problems
@ 2026-10-13 14:55 Kyrylo Biryuk
  2026-10-13 14:55 ` [PATCH v5 1/4] dm zoned: back off when reclaim finds no destination zone Kyrylo Biryuk
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Kyrylo Biryuk @ 2026-10-13 14:55 UTC (permalink / raw)
  To: dm-devel; +Cc: mpatocka, snitzer, agk, bmarzins, dlemoal, hare, linux-kernel

Mikulas,

I noticed too late that v3 of this series is already in dm-7.4 and
for-next (24646f6ed3, 2cca719c63, 5829edd027), so v4 crossed with it.
This v5 is v4 plus one more fix; if you prefer to keep v3, I can send
the v4 changes and patch 4 as incremental patches on top of dm-7.4
instead - please tell me which you want.

Patch 4 is new. While measuring an idle pool I found that an idle
target whose random (and cache) zones are all free never stops running
its reclaim work: since 90a9b8693f1b ("dm zoned: reclaim random zones
when idle"), dmz_should_reclaim() treats "idle" plus a non-zero total
number of random zones as "reclaim now", dmz_do_reclaim() finds no
candidate and returns -EBUSY, dmz_check_dev() checks every device for
media events (a TEST UNIT READY on SCSI disks), and the work is requeued
with no delay. In mainline the loop can end when a pass finishes while
the target is busy with enough free zones; with patch 3 the idle poll
stays armed, so the loop recurs whenever the target becomes idle.

Measured on 7.3-rc7 with three emulated host-managed members of an md
RAID5 (idle, 30 s average):

  stock dm-zoned        181,195 SCSI commands/s   32 % kernel CPU
  v4 (patches 1-3)      187,707 SCSI commands/s   31 % kernel CPU
  v5 (patches 1-4)            0 SCSI commands/s    0 % kernel CPU

With patch 4, the random zones filled by a 2 GiB write burst are still
reclaimed once the target is idle, and on three 27 TB host-managed
drives (7.2.10 with these patches) an idle pool went from about 155,000
TEST UNIT READY commands per second per drive to none.

Changes since v4:
 - new patch 4 (above)
 - patch 3: Reviewed-by from Damien Le Moal
 - patches 1-3 otherwise unchanged

Kyrylo Biryuk (4):
  dm zoned: back off when reclaim finds no destination zone
  dm zoned: do not reclaim a random zone into another random zone
  dm zoned: keep polling for idle reclaim after a reclaim pass
  dm zoned: do not busy-loop idle reclaim when no zone needs reclaim

 drivers/md/dm-zoned-reclaim.c | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

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

end of thread, other threads:[~2026-10-13 15:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 14:55 [PATCH v5 0/4] dm zoned: fix idle reclaim problems Kyrylo Biryuk
2026-10-13 14:55 ` [PATCH v5 1/4] dm zoned: back off when reclaim finds no destination zone Kyrylo Biryuk
2026-10-13 14:55 ` [PATCH v5 2/4] dm zoned: do not reclaim a random zone into another random zone Kyrylo Biryuk
2026-10-13 14:55 ` [PATCH v5 3/4] dm zoned: keep polling for idle reclaim after a reclaim pass Kyrylo Biryuk
2026-10-13 14:55 ` [PATCH v5 4/4] dm zoned: do not busy-loop idle reclaim when no zone needs reclaim Kyrylo Biryuk
2026-10-13 14:59   ` Damien Le Moal
2026-10-13 15:47 ` [PATCH v5 0/4] dm zoned: fix idle reclaim problems Mikulas Patocka

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

all inboxes | Powered by JetHome®