From patchwork Wed Jan 11 13:01:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13096013 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 76892C46467 for ; Wed, 11 Jan 2023 05:03:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230194AbjAKFDn (ORCPT ); Wed, 11 Jan 2023 00:03:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233452AbjAKFDe (ORCPT ); Wed, 11 Jan 2023 00:03:34 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 211E7CE3A; Tue, 10 Jan 2023 21:03:32 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4NsFv152Q5z4f3p0f; Wed, 11 Jan 2023 13:03:25 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgDX9S8fQ75jGl2gBQ--.10280S2; Wed, 11 Jan 2023 13:03:28 +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 v3 00/14] A few bugfix and cleanup patches for blk-mq Date: Wed, 11 Jan 2023 21:01:45 +0800 Message-Id: <20230111130159.3741753-1-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 MIME-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xZFpf9x07j7NVkUUUUU= X-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. --- 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 | 147 ++++++++++++++++++++----------------------- 2 files changed, 71 insertions(+), 83 deletions(-)