From: Eric Biggers <ebiggers@kernel.org>
To: dm-devel@lists.linux.dev, Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>
Cc: Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Sami Tolvanen <samitolvanen@google.com>
Subject: [PATCH] dm verity: don't use WQ_MEM_RECLAIM
Date: Tue, 3 Sep 2024 21:04:44 -0700 [thread overview]
Message-ID: <20240904040444.56070-1-ebiggers@kernel.org> (raw)
From: Eric Biggers <ebiggers@google.com>
Since dm-verity doesn't support writes, the kernel's memory reclaim code
will never wait on dm-verity work. That makes the use of WQ_MEM_RECLAIM
in dm-verity unnecessary. WQ_MEM_RECLAIM has been present from the
beginning of dm-verity, but I could not find a justification for it;
I suspect it was just copied from dm-crypt which does support writes.
Therefore, remove WQ_MEM_RECLAIM from dm-verity. This eliminates the
creation of an unnecessary rescuer thread per dm-verity device.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
drivers/md/dm-verity-target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c
index cf659c8feb29f..051e84ca401dc 100644
--- a/drivers/md/dm-verity-target.c
+++ b/drivers/md/dm-verity-target.c
@@ -1488,11 +1488,11 @@ static int verity_ctr(struct dm_target *ti, unsigned int argc, char **argv)
* Also as required for the "try_verify_in_tasklet" feature: WQ_HIGHPRI
* allows verify_wq to preempt softirq since verification in BH workqueue
* will fall-back to using it for error handling (or if the bufio cache
* doesn't have required hashes).
*/
- v->verify_wq = alloc_workqueue("kverityd", WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
+ v->verify_wq = alloc_workqueue("kverityd", WQ_HIGHPRI, 0);
if (!v->verify_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
goto bad;
}
base-commit: 88fac17500f4ea49c7bac136cf1b27e7b9980075
--
2.46.0
next reply other threads:[~2024-09-04 4:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 4:04 Eric Biggers [this message]
2024-09-05 14:32 ` Mike Snitzer
2024-09-05 18:21 ` [PATCH] " Mikulas Patocka
2024-09-05 22:35 ` Eric Biggers
2024-09-05 23:35 ` sharing rescuer threads when WQ_MEM_RECLAIM needed? [was: Re: dm verity: don't use WQ_MEM_RECLAIM] Mike Snitzer
2024-09-06 1:34 ` Tejun Heo
2024-09-06 11:23 ` Mikulas Patocka
2024-09-06 10:59 ` [PATCH] dm verity: don't use WQ_MEM_RECLAIM Mikulas Patocka
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=20240904040444.56070-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=agk@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpatocka@redhat.com \
--cc=samitolvanen@google.com \
--cc=snitzer@kernel.org \
--cc=tj@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