Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4790056rdb; Fri, 15 Sep 2023 12:17:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGaa8mQC8BcxQ6H8GYltzadQFmfPM8yZqMfELU0i4DAXtH3JUVQ9Sv/ARq/eNWxpOEgfjkc X-Received: by 2002:a17:903:32c5:b0:1c3:3461:75b5 with SMTP id i5-20020a17090332c500b001c3346175b5mr3206658plr.0.1694805473679; Fri, 15 Sep 2023 12:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694805473; cv=none; d=google.com; s=arc-20160816; b=Ge6nOgxAhKx0OT+OeiT6QGEWIkv3aV8UuiMPmhvH7G8Qa63p+36ccmJSDPt752P8QC ERpDPXTw25uUTTXRWPOhWVm/LAx4KyTE9KNxsHxtILoZF/atqODf8Alxfxf+bV4bUNDC XflYEHK2G+SD7g6HF+fW4XGBEzhlT17x2RkTftgl0L7GbO4oqNxynyrLFDOwhHEBqFxI mfeUgTyywAv7YlBNU592ieBjnZ5txbZ9FlGOZpjF27VQ/sOQrW2jy5gimWHf8JFEimQR JV67s2z36FStiTdva43indpDdi4iihMseFbGnAq5A1ZTurwzZn8NIrRhjlzhZFkjnRDj dPmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Z8jXCZPukC62KzuUdS/5ci4fhw4YoBdcpJ7VcWMR4Nw=; fh=szS6nKOHqWqdmo+pDmdMHkpBM8bpzBlMJyKfLi9jRHY=; b=GSJGf8kgNyqwTGE5hwQCUrGfksIK8VGuKtEb4LxFsddTX0gkbKB4U8FQjYun0j6oD3 sGgZeiBxWImxurJIAQEBVXh6XZUT5M0t8js6cJubK65I81Ly6twyVa8n3Zk13cQ2THSF Nk42DMusa5m7TEY27xncA6gHiYkZbcM7y8wdaWBPU/z+rsqvG79ee3c9wPOnHExiVQGo j02oGdarRcwSSbpFgAHCJcQL8UYAH4SnqIwA7Rw71y1BedPvWyOuiQxIU+HU/Ij61GzA IPB/kWPjpz6D0wUYbxqAQh/CdQ91V+jIGkbCnvwmzA+kjaqKBerNL+ZEjQebPGcM8t5h JZdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=R6OB3Xsf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b3-20020a170903228300b001b6c462acbdsi4016826plh.15.2023.09.15.12.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 12:17:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=R6OB3Xsf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D69C780238A2; Wed, 13 Sep 2023 08:17:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241607AbjIMPRC (ORCPT + 99 others); Wed, 13 Sep 2023 11:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241634AbjIMPQf (ORCPT ); Wed, 13 Sep 2023 11:16:35 -0400 Received: from out-217.mta1.migadu.com (out-217.mta1.migadu.com [IPv6:2001:41d0:203:375::d9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 567C01BE for ; Wed, 13 Sep 2023 08:16:30 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1694618188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Z8jXCZPukC62KzuUdS/5ci4fhw4YoBdcpJ7VcWMR4Nw=; b=R6OB3Xsf2pprFdH7VzdzY8IkhbUPDPog74gB0aXDQyuHRt5dO8sJNIuWBcvxyL/jOL0Wcg JAJC4tat6BWfqPkW99yfZEBnhOWM3bxjHce+tXxgvyu/OAu/Q1daxg+ZZwcTgwSwfaS989 MTV/iwizyG9Ylw9TS1LLaH3I/VrsCPU= From: chengming.zhou@linux.dev To: axboe@kernel.dk, hch@lst.de, ming.lei@redhat.com, bvanassche@acm.org Cc: kbusch@kernel.org, mst@redhat.com, damien.lemoal@opensource.wdc.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, chengming.zhou@linux.dev, Chengming Zhou Subject: [PATCH v2 0/5] blk-mq: optimize queue_rqs() support Date: Wed, 13 Sep 2023 15:16:11 +0000 Message-Id: <20230913151616.3164338-1-chengming.zhou@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Sep 2023 08:17:31 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email From: Chengming Zhou Changes in v2: - Drop the patch that fixes a potential race in request timeout from this series. - Rebased on the newest block/for-next branch. The current queue_rqs() support has limitation that it can't work on shared tags queue, which is resolved by patch 1-3. We move the account of active requests to where we really allocate the driver tag. This is clearer and matched with the unaccount side which now happen when we put the driver tag. And we can remove RQF_MQ_INFLIGHT, which was used to avoid double account problem of flush request. Another problem is that the driver that support queue_rqs() has to set inflight request table by itself, which is resolved in patch 4. The last patch add queue_rqs() support for null_blk, which showed 3.6% IOPS improvement in fio/t/io_uring benchmark on my test VM. And we also use it for testing queue_rqs() on shared tags queue. Thanks for review! Chengming Zhou (5): blk-mq: account active requests when get driver tag blk-mq: remove RQF_MQ_INFLIGHT blk-mq: support batched queue_rqs() on shared tags queue blk-mq: update driver tags request table when start request block/null_blk: add queue_rqs() support block/blk-flush.c | 11 ++----- block/blk-mq-debugfs.c | 1 - block/blk-mq.c | 45 +++++++++------------------ block/blk-mq.h | 57 ++++++++++++++++++++++++----------- drivers/block/null_blk/main.c | 20 ++++++++++++ drivers/block/virtio_blk.c | 2 -- drivers/nvme/host/pci.c | 1 - include/linux/blk-mq.h | 2 -- 8 files changed, 76 insertions(+), 63 deletions(-) -- 2.40.1