From patchwork Wed Jan 18 09:28:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13105392 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 B12DDC00A5A for ; Wed, 18 Jan 2023 01:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229674AbjARBam (ORCPT ); Tue, 17 Jan 2023 20:30:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbjARBaj (ORCPT ); Tue, 17 Jan 2023 20:30:39 -0500 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 473843EC48; Tue, 17 Jan 2023 17:30:33 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4NxSr406M2z4f3pGD; Wed, 18 Jan 2023 09:30:28 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgBHr7K0S8djLtqxBw--.50004S2; Wed, 18 Jan 2023 09:30:30 +0800 (CST) From: Kemeng Shi To: hch@lst.de, axboe@kernel.dk, dwagner@suse.de, hare@suse.de, ming.lei@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: john.garry@huawei.com, jack@suse.cz Subject: [PATCH v4 00/14] A few bugfix and cleanup patches for blk-mq Date: Wed, 18 Jan 2023 17:28:44 +0800 Message-Id: <20230118092858.3911211-1-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CM-TRANS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-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Hi, this series contain several bugfix patches to fix potential io hung and a few cleanup patches to remove stale codes and unnecessary check. Most changes are in request issue and dispatch path. Thanks. --- V4: -Eliminate remove of from_schedule parameter in blk_mq_commit_rqs in patch "blk-mq: remove unncessary from_schedule parameter in" and remove Reviewed-by tag of this changed patch. -Trace unplug event for all commits and make patches based on new general blk_mq_commit_rqs -Fix some code style issues. -Initialize ret to BLK_STS_OK in patches "blk-mq: remove unncessary error count and commit in" and "blk-mq: use blk_mq_commit_rqs helper in blk_mq_try_issue_list_directly". V3: -Collect Reviewed-by from Christoph -Add new patch "blk-mq: make blk_mq_commit_rqs a general function for all commits" suggested-by Christoph -Move patch "blk-mq: remove unncessary from_schedule parameter in blk_mq_plug_issue_direct" forwad. This is because of some abandoned work, no influence anyway. No special attention should be paied. -Make patch based on rewriten blk_mq_commit_rqs. V2: -Thanks Christoph for review and there are two fixes in v2 according to recommends from Christoph. 1)Avoid overly long line in patch "blk-mq: avoid sleep in blk_mq_alloc_request_hctx" 2)Check BLK_MQ_REQ_NOWAIT and BLK_MQ_REQ_RESERVED in two WARN_ON_ONCE --- Kemeng Shi (14): blk-mq: avoid sleep in blk_mq_alloc_request_hctx blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx blk-mq: wait on correct sbitmap_queue in blk_mq_mark_tag_wait blk-mq: Fix potential io hung for shared sbitmap per tagset blk-mq: remove unnecessary list_empty check in blk_mq_try_issue_list_directly blk-mq: remove unncessary from_schedule parameter in blk_mq_plug_issue_direct blk-mq: make blk_mq_commit_rqs a general function for all commits blk-mq: remove unncessary error count and commit in blk_mq_plug_issue_direct blk-mq: use blk_mq_commit_rqs helper in blk_mq_try_issue_list_directly blk-mq: simplify flush check in blk_mq_dispatch_rq_list blk-mq: remove unnecessary error count and check in blk_mq_dispatch_rq_list blk-mq: remove set of bd->last when get driver tag for next request fails blk-mq: use switch/case to improve readability in blk_mq_try_issue_list_directly blk-mq: correct stale comment of .get_budget block/blk-mq-sched.c | 7 +-- block/blk-mq.c | 144 +++++++++++++++++++------------------------ 2 files changed, 68 insertions(+), 83 deletions(-)