mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: illofspeed <illofspeed@gmail.com>, dm-devel@lists.linux.dev
Cc: agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com,
	bmarzins@redhat.com, hare@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] dm zoned: back off when reclaim finds no destination zone
Date: Sun, 11 Oct 2026 16:24:40 +0200	[thread overview]
Message-ID: <8d1ee370-2785-438d-9c5b-8363584a23aa@kernel.org> (raw)
In-Reply-To: <20261010161613.396-2-illofspeed@gmail.com>

On 2026/10/10 18:16, illofspeed wrote:
> When dmz_do_reclaim() fails with -ENOSPC because no free zone is
> available to copy the data into, dmz_reclaim_work() still ends with
> dmz_schedule_reclaim(). If the target is idle, dmz_should_reclaim()
> keeps returning true, the work is queued again with no delay and the
> worker spins on the same failing pass.
> 
> Re-arm the idle poll instead, so that reclaim is retried after
> DMZ_IDLE_PERIOD. The next patch makes -ENOSPC the expected result when
> an idle target has random zones but no free sequential zone.
> 
> Tested on a 7.2.6 kernel as an out-of-tree dm-zoned module, together
> with the next two patches, on emulated host-managed drives (tcmu-runner
> ZBC handler) and on three 27 TB host-managed drives used as md RAID5
> members.
> 
> Assisted-by: LLM
> Signed-off-by: illofspeed <illofspeed@gmail.com>

Patch looks OK, but is "ilofspeed" your full name?

> ---
>  drivers/md/dm-zoned-reclaim.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c
> index c041413c729..315f0da99f3 100644
> --- a/drivers/md/dm-zoned-reclaim.c
> +++ b/drivers/md/dm-zoned-reclaim.c
> @@ -540,6 +540,14 @@ static void dmz_reclaim_work(struct work_struct *work)
>  	if (ret && ret != -EINTR) {
>  		if (!dmz_check_dev(zmd))
>  			return;
> +		if (ret == -ENOSPC) {
> +			/*
> +			 * No zone to copy into: nothing can progress now.
> +			 * Rescheduling immediately would spin; poll instead.
> +			 */
> +			mod_delayed_work(zrc->wq, &zrc->work, DMZ_IDLE_PERIOD);
> +			return;
> +		}
>  	}
>  
>  	dmz_schedule_reclaim(zrc);


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2026-10-11 14:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-10 16:16 [PATCH v2 0/3] dm zoned: fix two idle reclaim problems illofspeed
2026-10-10 16:16 ` [PATCH v2 1/3] dm zoned: back off when reclaim finds no destination zone illofspeed
2026-10-11 14:24   ` Damien Le Moal [this message]
2026-10-11 16:17     ` illofspeed
2026-10-11 16:32       ` Damien Le Moal
2026-10-11 16:47       ` Damien Le Moal
2026-10-10 16:16 ` [PATCH v2 2/3] dm zoned: do not reclaim a random zone into another random zone illofspeed
2026-10-11 14:30   ` Damien Le Moal
2026-10-11 16:17     ` illofspeed
2026-10-10 16:16 ` [PATCH v2 3/3] dm zoned: keep polling for idle reclaim after a reclaim pass illofspeed
2026-10-11 14:31   ` Damien Le Moal
2026-10-11 16:17     ` illofspeed
2026-10-11 14:23 ` [PATCH v2 0/3] dm zoned: fix two idle reclaim problems Damien Le Moal
2026-10-11 14:33 ` Damien Le Moal

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=8d1ee370-2785-438d-9c5b-8363584a23aa@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=agk@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=hare@suse.de \
    --cc=illofspeed@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@kernel.org \
    /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 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®