From nobody Wed Dec 17 09:16:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82F34C4167B for ; Tue, 28 Nov 2023 09:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbjK1Joz (ORCPT ); Tue, 28 Nov 2023 04:44:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231394AbjK1Joq (ORCPT ); Tue, 28 Nov 2023 04:44:46 -0500 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB09110E for ; Tue, 28 Nov 2023 01:44:51 -0800 (PST) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 3AS9iIWO061665; Tue, 28 Nov 2023 17:44:18 +0800 (+08) (envelope-from Yunlong.Xing@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4SfcpY5H47z2MxJxp; Tue, 28 Nov 2023 17:38:45 +0800 (CST) Received: from tj10379pcu.spreadtrum.com (10.5.32.15) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 28 Nov 2023 17:44:16 +0800 From: Yunlong Xing To: , , , , CC: , , , , Subject: [PATCH] dm: increase the io priority of the kworker-kverityd process Date: Tue, 28 Nov 2023 17:44:14 +0800 Message-ID: <20231128094414.583666-1-yunlong.xing@unisoc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.5.32.15] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL: SHSQR01.spreadtrum.com 3AS9iIWO061665 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Hongyu Jin When obtaining the hash value of a high IO priority data block from the disk, the kverity-worker that obtains the hash will also have a high IO priority to avoid being blocked by other IO with low IO priority. Signed-off-by: Hongyu Jin Signed-off-by: Yibin Ding --- drivers/md/dm-verity-target.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c index e115fcfe723c..ade9c6734154 100644 --- a/drivers/md/dm-verity-target.c +++ b/drivers/md/dm-verity-target.c @@ -22,6 +22,7 @@ #include #include #include +#include =20 #define DM_MSG_PREFIX "verity" =20 @@ -639,7 +640,9 @@ static void verity_finish_io(struct dm_verity_io *io, b= lk_status_t status) static void verity_work(struct work_struct *w) { struct dm_verity_io *io =3D container_of(w, struct dm_verity_io, work); + struct bio *bio =3D dm_bio_from_per_bio_data(io, io->v->ti->per_io_data_s= ize); =20 + set_task_ioprio(current, bio->bi_ioprio); io->in_tasklet =3D false; =20 verity_fec_init_io(io); --=20 2.25.1