From patchwork Wed Sep 4 04:04:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 13789676 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 546F2CA0ED3 for ; Wed, 4 Sep 2024 04:05:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7A658D021F; Wed, 4 Sep 2024 00:05:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D03CB8D018A; Wed, 4 Sep 2024 00:05:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA47E8D021F; Wed, 4 Sep 2024 00:05:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 9AB648D018A for ; Wed, 4 Sep 2024 00:05:17 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 252DB120C38 for ; Wed, 4 Sep 2024 04:05:17 +0000 (UTC) X-FDA: 82525715874.19.FE79C4D Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf09.hostedemail.com (Postfix) with ESMTP id 8D66414001C for ; Wed, 4 Sep 2024 04:05:15 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=V0hZ+nqo; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf09.hostedemail.com: domain of ebiggers@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=ebiggers@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725422638; a=rsa-sha256; cv=none; b=qMOTCZDbkxK4F/8ZeebnlTz3Gt7Pu2hq6UQt3QSMD7qkwDyTxzVZbzoM/JcO6PXFBPjsqB eNbDnpVFaEzl+RsY327tPKLRaphPo8yhB6IumAkIGXxie6itML/JhT0ZT2+Iv3HX9idbpB 3/kaVGtYkj/KKtLvF0L8Zf0EwvMhzRA= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=V0hZ+nqo; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf09.hostedemail.com: domain of ebiggers@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=ebiggers@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725422638; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=U5IGmXIapNHCvT214tbpLubHyU4+7APmInqkFH780EI=; b=QR7rhF0eTuKz6xZRU0VS/UZyD4kpmgzwOwRRCxqL/zS8lhXdJdVaiD9YPvWQxndO4SuLu3 SgHj6nIuL4ctNZSMO7s/Va5XcOY1ceFmfrX9NT5+aLKn1UlDYtd7nMRm/4s16NwNq+fvG3 yO4z+kxZzthsliuAJAtVYNQfn7vfNc0= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id F20EB5C56A6; Wed, 4 Sep 2024 04:05:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC247C4CEC2; Wed, 4 Sep 2024 04:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725422714; bh=gU7VljMglbdj3Lw8JJeKa4ccbDe1OwyrXenD1IfQ948=; h=From:To:Cc:Subject:Date:From; b=V0hZ+nqoc6SiidhET/uxPq4RnfIqqLYmRFnx74j8lPJIn6aflHuD2qVwls88i591K hpDfiqOzVOgwYXXdR1MvuvO/7awQb5l+nqzWC0bZ0dX5D1JV3aw9RtyUXCdMJMR8mB 9XHukIpF1B5759iRC6InJFkzOmCr7XXvS80ARjJLj9jRjx/URpx2CCH+jxoP+BPCvN t00i55xf/OfkUOFSOI1osyGczd6SBWwVZt3TR5HUZ7gkTc+slUIod+zeMacjGKAzlU b2dfFUcutqYOx7JAa82U5ZwBHbyOwv7SJ9O4iIYeQBplkOam7KTGgfQB0YXWYQkac4 ql0nCN2e0SvZw== From: Eric Biggers To: dm-devel@lists.linux.dev, Alasdair Kergon , Mike Snitzer , Mikulas Patocka Cc: Tejun Heo , Lai Jiangshan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sami Tolvanen Subject: [PATCH] dm verity: don't use WQ_MEM_RECLAIM Date: Tue, 3 Sep 2024 21:04:44 -0700 Message-ID: <20240904040444.56070-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8D66414001C X-Stat-Signature: 56ikynek83azfwzpqudrf31wzy1gzr8b X-Rspam-User: X-HE-Tag: 1725422715-889505 X-HE-Meta: U2FsdGVkX1/uciv7WtEcGvKP4+6ifX12eqfOu3VOTjSCia/pdUwznx7KH4/Hs5cdKfog3nUM6W+rmx51F8E9td/VC8Nyi7VfY+fy1/R7Jxvx7S2cm1zmdCVSVhTFQhLLXsILZDMvGnC4mnVH5NjlOpvVCPCqa00tPbnczk7Ztvhspgm3/K7R0IznRMNZGdbP6bUd1hyX8sTw0Hj79zrSMq8WmpBC7LNicWDe+xKy7BLIVLEZXfQ/VRpvnY11QFoncMGMzDf3XnQpkfXC1JphDrtEtc7lSzD7KjHPGUajbZiG8u+85Pb94qij4N5Cz505fnrvwz9q4OcFyMZn0DvPfFvR/MEao9b+4LeS0V5yqNAqJxArWOWgX3U2PTizgfETl9EOqD1foVABIBo4mvsbh3PGs6p17Q5nxoMqV8xSpDeEZgqzKqfeMnSLxQsIPK0qW955FQX2bAeF+cumGlAO2vXhZEj5ixMmxLRm4EeC8sgtE1K0mvVCa6IvU4Z32HjH7XaHeZuNEXiABmNZ+R1GoAnDQcYjOdgMGvvwJP0K82hTIVrjAybpmza5Cez8AA9YYf6C+x6/dqpew18YXMCxg/64f4rKXONE9jIuNOk092XzNSL7mWzJ+hKHfW1jD5+xx/a5jmIn88sQL1jZxHWdIpVMPQz+VBC+LmrduJNpYJD1ZXDDe7pv7U78zhY8J2bDUC8dHAbHjFYCPiU3A9abc+AgQWjOPl9sqqACL8yj1rFwnCgThRlDBokiaM0uUwYf3iJParvkZeaioFd0HofuiIekRppl0BddCCIeRAIwEVKgpSdIs5PL2R7gAvZ4VLixB7R6vE6tQDUFI5u3kAxnhhDgmfgA6lIALQhQmAoxDHjNdHcI/lu0NCMX1wOfBbhKlw4xUF9aFxQ7SAvEVZotQZBFLqCeg2HztsE80APPoVgIrx9WjYNZkG2Fa9l7j/UDEs04BQyoL+ZlQyaEzrJ 9bkhYAQP kCINgRZINWOjZ5/gGDkJ2v4OiDdcW9JWbLXs2syXx1FLGej85nx4bj/5KDKhOy6P78FvFOV1WbEpIlNheGd6zrev6agyRbLtxhoP+8BbU3tFoFzJnYaj1jd8Mp7AXhQkiV3iHr0HhlF1yBTu6K0y/GYRgjAsa1aHEfMbMITENEAhmmycfbQ+r8NR01aY5ElXMuiH5VNh8e6t/uEiOvByHGMIuceBnBpHaZSmO0ZykY25Md+3LlPEtCTWPXMbV/ayS/E7d X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Eric Biggers 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 Reviewed-by: Mike Snitzer --- drivers/md/dm-verity-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 88fac17500f4ea49c7bac136cf1b27e7b9980075 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; }