From: Benjamin Marzinski <bmarzins@redhat.com>
To: Qiliang Yuan <qiliang.yuan@linux.dev>
Cc: 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
Subject: Re: [PATCH 1/2] dm thin: drop the grace period from thin_ctr()
Date: Tue, 17 Nov 2026 19:51:59 -0500 [thread overview]
Message-ID: <avz2r1E3cS08yPIS@redhat.com> (raw)
In-Reply-To: <20261116-bug-dm-thin-rcu-gp-v1-1-14ed3567da3e@linux.dev>
On Mon, Nov 16, 2026 at 12:12:03AM -0500, Qiliang Yuan wrote:
> thin_ctr() adds the new thin to pool->active_thins with
> list_add_tail_rcu() and then calls synchronize_rcu(), so that a
> wake_worker() call can't miss the bios of a thin that isn't visible yet.
>
> The grace period doesn't make the entry any more visible. A worker that
> walks the list after list_add_tail_rcu() finds the thin, and the thin
> gets no bios before its table is resumed. A walk already in progress may
> miss it, but the wake_worker() for the first bio queues the worker
> again. Still, activating a thin device waits for a full grace period,
> which takes about half of the activation.
>
> Remove the synchronize_rcu() call.
>
> Activating 100 thin devices of an idle pool with dmsetup create takes
> per device (mean of five rounds, min-max of the rounds in parentheses):
>
> before (ms) after (ms) change
> 15.4 (14.9-15.9) 7.6 (7.3-7.8) -51%
>
> Signed-off-by: Qiliang Yuan <qiliang.yuan@linux.dev>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
next prev parent reply other threads:[~2026-11-18 0:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 5:12 [PATCH 0/2] dm thin: stop waiting for grace periods when activating and removing thins Qiliang Yuan
2026-11-16 5:12 ` [PATCH 1/2] dm thin: drop the grace period from thin_ctr() Qiliang Yuan
2026-11-18 0:51 ` Benjamin Marzinski [this message]
2026-11-16 5:12 ` [PATCH 2/2] dm thin: free thins with kfree_rcu() instead of waiting in thin_dtr() Qiliang Yuan
2026-11-18 1:13 ` Benjamin Marzinski
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=avz2r1E3cS08yPIS@redhat.com \
--to=bmarzins@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=qiliang.yuan@linux.dev \
--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®