From patchwork Thu Nov 23 10:24:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kundan Kumar X-Patchwork-Id: 13466151 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="eI9tDwF2" Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CCD4D53 for ; Thu, 23 Nov 2023 03:54:00 -0800 (PST) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20231123115356epoutp022d5ccc40f5adab8415b88e1ff3958377~aPmqQorPz0563605636epoutp02P for ; Thu, 23 Nov 2023 11:53:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20231123115356epoutp022d5ccc40f5adab8415b88e1ff3958377~aPmqQorPz0563605636epoutp02P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1700740436; bh=16P/YVEtPaR5kTXsVGT+FoFHMuw63eXy9vxLtuymCL8=; h=From:To:Cc:Subject:Date:References:From; b=eI9tDwF2C7xHPUTgqMs7TDZPLywfLVQnl9Coe901ha07fYeLyj2PvtM0LCNAAp/Ur RcEa6RV/iFNo3hxfQAV9YjeK5lSY3cY8y+hlbGxUTTn8SzCt2MofmaO4e7VxIQVKOQ 6hRqCccMxTB7k0YOoHBRmbFjZJ7jcbIazX6fOpJI= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20231123115356epcas5p12dc88c3ff782cd896ab9659ecdff8bfb~aPmp1gZvQ2493024930epcas5p1n; Thu, 23 Nov 2023 11:53:56 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.177]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Sbc2p4pmxz4x9Pv; Thu, 23 Nov 2023 11:53:54 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 35.2A.10009.25D3F556; Thu, 23 Nov 2023 20:53:54 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20231123103102epcas5p2aee268735dc9e0c357e6d3b98d16fe21~aOeR3plNz0825008250epcas5p20; Thu, 23 Nov 2023 10:31:02 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231123103102epsmtrp23203d5186bdf5e059d565e758fd57749~aOeR3DCTi0840608406epsmtrp2i; Thu, 23 Nov 2023 10:31:02 +0000 (GMT) X-AuditID: b6c32a4a-261fd70000002719-25-655f3d52b090 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 4C.79.08755.6E92F556; Thu, 23 Nov 2023 19:31:02 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20231123103058epsmtip194e3accb2b52f1ca5ba460969b9ea741~aOeOZCbRj2077720777epsmtip1Z; Thu, 23 Nov 2023 10:30:58 +0000 (GMT) From: "kundan.kumar" To: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de Cc: linux-block@vger.kernel.org, Kundan Kumar , Kanchan Joshi Subject: [PATCH] block: skip QUEUE_FLAG_STATS and rq-qos for passthrough io Date: Thu, 23 Nov 2023 15:54:31 +0530 Message-Id: <20231123102431.6804-1-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBKsWRmVeSWpSXmKPExsWy7bC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 20231123103102epcas5p2aee268735dc9e0c357e6d3b98d16fe21 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20231123103102epcas5p2aee268735dc9e0c357e6d3b98d16fe21 References: From: Kundan Kumar Write-back throttling (WBT) enables QUEUE_FLAG_STATS on the request queue. But WBT does not make sense for passthrough io, so skip QUEUE_FLAG_STATS processing. Also skip rq_qos_issue/done for passthrough io. Overall, the change gives ~11% hike in peak performance. Signed-off-by: Kundan Kumar Signed-off-by: Kanchan Joshi --- block/blk-mq.c | 3 ++- block/blk-rq-qos.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 900c1be1fee1..2de9c14dd43f 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1248,7 +1248,8 @@ void blk_mq_start_request(struct request *rq) trace_block_rq_issue(rq); - if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) { + if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags) + && !blk_rq_is_passthrough(rq)) { rq->io_start_time_ns = ktime_get_ns(); rq->stats_sectors = blk_rq_sectors(rq); rq->rq_flags |= RQF_STATS; diff --git a/block/blk-rq-qos.h b/block/blk-rq-qos.h index f48ee150d667..37245c97ee61 100644 --- a/block/blk-rq-qos.h +++ b/block/blk-rq-qos.h @@ -118,7 +118,7 @@ static inline void rq_qos_cleanup(struct request_queue *q, struct bio *bio) static inline void rq_qos_done(struct request_queue *q, struct request *rq) { - if (q->rq_qos) + if (q->rq_qos && !blk_rq_is_passthrough(rq)) __rq_qos_done(q->rq_qos, rq); }