mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qiliang Yuan <qiliang.yuan@linux.dev>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Qiliang Yuan <qiliang.yuan@linux.dev>,
	Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>,
	Mikulas Patocka <mpatocka@redhat.com>,
	dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 0/3] dm thin: stop waiting for grace periods when activating and removing thins
Date: Thu, 19 Nov 2026 01:25:25 -0500	[thread overview]
Message-ID: <20261119062525.1488091-1-qiliang.yuan@linux.dev> (raw)
In-Reply-To: <20261119-bug-dm-thin-rcu-gp-v2-0-055d627763c3@linux.dev>

On Thu, Nov 19, 2026 at 12:24:21AM -0500, Benjamin Marzinski wrote:
> I posted an alternate version of your [PATCH 2/2] that fixes the issue
> I mentioned. Can you verify that it works for you?
>
> I squashed it with your patch, since it your original patch did most of
> the work of fixing the issue, and it seemed easier to just have one
> patch to backport to fix it. I could refactor it into two patches: one
> the fixes the bug, and a second that just swaps the synchronize_rcu()
> for kfree_rcu(), if people would rather not mix the bug fix and feature.

Ben, this v2 crossed with your patch [1], and its 2/3 carries the wrong
Fixes tag. I'll send a v3 built on your version, still as three patches,
so that the fix can go to stable without the kfree_rcu() change:

- 1/3 "dm thin: drop the grace period from thin_ctr()": unchanged, and
  it keeps your Reviewed-by.
- 2/3: the fix, taken from your patch. thin_dtr() marks the thin dying,
  the walkers take references with refcount_inc_not_zero() and skip
  dying thins, requeue_bios() and error_retry_list_with_code() skip
  them too, and the thin leaves active_thins only after its refcount
  drops to zero, followed by synchronize_rcu() before it is freed.
  Fixes: 17181fb7a0c3, Cc: stable, with your Co-developed-by and
  Signed-off-by.
- 3/3: replace that synchronize_rcu() with kfree_rcu().

Before sending it I'll rerun the KASAN reproducer on 2/3 alone and
remeasure each patch.

[1] https://lore.kernel.org/r/20261119051620.507189-1-bmarzins@redhat.com

Thanks,
Qiliang

      parent reply	other threads:[~2026-11-19  6:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  5:45 Qiliang Yuan
2026-11-19  5:45 ` [PATCH v2 1/3] dm thin: drop the grace period from thin_ctr() Qiliang Yuan
2026-11-19  5:45 ` [PATCH v2 2/3] dm thin: keep a thin on active_thins until its last reference is dropped Qiliang Yuan
2026-11-19  5:45 ` [PATCH v2 3/3] dm thin: free thins with kfree_rcu() instead of waiting in thin_dtr() Qiliang Yuan
2026-11-19  6:25 ` Qiliang Yuan [this message]

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=20261119062525.1488091-1-qiliang.yuan@linux.dev \
    --to=qiliang.yuan@linux.dev \
    --cc=agk@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@kernel.org \
    --cc=stable@vger.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®