From patchwork Fri Jun 3 04:55:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868492 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 BCF58C43334 for ; Fri, 3 Jun 2022 04:56:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238921AbiFCE4F (ORCPT ); Fri, 3 Jun 2022 00:56:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4E (ORCPT ); Fri, 3 Jun 2022 00:56:04 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09F1436E10 for ; Thu, 2 Jun 2022 21:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=5MUNTIHS7zg2+YSvCs7EnS39OLOi6aSeNGIMsOorwM4=; b=HcCrKgS5qSVSMKDiAK8BhU+EAS /qMprE7lKhHdVgF+zHp8cvXW6zIYnNehzMrocnmr3lf1aff06ueF7jL1SxCpcbkfjbCcDCGEnDFuh msKRBdch/Dd3JGAF3lqjBrQ+xN7myWll5lvEDhdaeOK014atIrNDaJlin9inV0nAFfXGjRtBMsatO tozJ6+SxzbSs5Nf8/VtlueJiNKXEPRuu5bgWwYZ9cWJ6rzVrjJomvD+yIxfgirvwJTz4nv7t/wgz+ dEpPYu+eezwiOaPuOjvJfDOYjB7LVg/3E9P/qVBbib3wgHRayj7KwjtUacM0EFsPaRc9FuWi0dyD6 dXmieCNg==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzLv-005qON-9R; Fri, 03 Jun 2022 04:56:03 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 01/13] common/null_blk: remove explicit queue_mode=2 parameters Date: Fri, 3 Jun 2022 06:55:46 +0200 Message-Id: <20220603045558.466760-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org queue_mode 2 (aka blk-mq) is the default in null_blk, so remove the extra explicitly parameter. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni --- tests/block/006 | 2 +- tests/block/010 | 4 ++-- tests/block/014 | 2 +- tests/block/015 | 2 +- tests/block/016 | 2 +- tests/block/017 | 3 +-- tests/block/018 | 3 +-- tests/block/020 | 2 +- tests/block/022 | 2 +- tests/block/024 | 3 +-- tests/block/029 | 2 +- tests/block/030 | 2 +- tests/block/031 | 2 +- 13 files changed, 14 insertions(+), 17 deletions(-) diff --git a/tests/block/006 b/tests/block/006 index 0b8a3c0..7ca1021 100755 --- a/tests/block/006 +++ b/tests/block/006 @@ -24,7 +24,7 @@ test() { _divide_timeout 2 FIO_PERF_FIELDS=("read iops") - if ! _init_null_blk queue_mode=2 submit_queues=2 blocking=1; then + if ! _init_null_blk submit_queues=2 blocking=1; then return 1 fi diff --git a/tests/block/010 b/tests/block/010 index b81208e..ed56135 100644 --- a/tests/block/010 +++ b/tests/block/010 @@ -49,7 +49,7 @@ test() { _divide_timeout 2 - if ! _init_null_blk queue_mode=2 submit_queues=16 nr_devices=32; then + if ! _init_null_blk submit_queues=16 nr_devices=32; then return 1 fi @@ -58,7 +58,7 @@ test() { run_fio_job _exit_null_blk - if ! _init_null_blk queue_mode=2 submit_queues=16 nr_devices=32 shared_tags=1; then + if ! _init_null_blk submit_queues=16 nr_devices=32 shared_tags=1; then return 1 fi diff --git a/tests/block/014 b/tests/block/014 index 04c34fa..449046a 100755 --- a/tests/block/014 +++ b/tests/block/014 @@ -18,7 +18,7 @@ test() { # The format is ",,,". Here, we # fail 50% of I/Os. - if ! _init_null_blk queue_mode=2 timeout='1,50,0,-1'; then + if ! _init_null_blk timeout='1,50,0,-1'; then return 1 fi diff --git a/tests/block/015 b/tests/block/015 index 79102a2..2e5cf35 100755 --- a/tests/block/015 +++ b/tests/block/015 @@ -20,7 +20,7 @@ test() { # The format is ",,,". Here, we # requeue 10% of the time. - if ! _init_null_blk queue_mode=2 requeue='1,10,0,-1'; then + if ! _init_null_blk requeue='1,10,0,-1'; then return 1 fi diff --git a/tests/block/016 b/tests/block/016 index c70b7d0..2b7a05f 100755 --- a/tests/block/016 +++ b/tests/block/016 @@ -20,7 +20,7 @@ requires() { test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk queue_mode=2 irqmode=2 completion_nsec=2000000000; then + if ! _init_null_blk irqmode=2 completion_nsec=2000000000; then return 1 fi diff --git a/tests/block/017 b/tests/block/017 index e4a9259..c84b661 100755 --- a/tests/block/017 +++ b/tests/block/017 @@ -27,8 +27,7 @@ show_inflight() { test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk queue_mode=2 irqmode=2 \ - completion_nsec=500000000; then + if ! _init_null_blk irqmode=2 completion_nsec=500000000; then return 1 fi diff --git a/tests/block/018 b/tests/block/018 index 7312723..a80ecbc 100755 --- a/tests/block/018 +++ b/tests/block/018 @@ -33,8 +33,7 @@ test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk queue_mode=2 irqmode=2 \ - completion_nsec=1000000000; then + if ! _init_null_blk irqmode=2 completion_nsec=1000000000; then return 1 fi diff --git a/tests/block/020 b/tests/block/020 index b4887a2..eef63cb 100755 --- a/tests/block/020 +++ b/tests/block/020 @@ -20,7 +20,7 @@ requires() { test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk queue_mode=2 irqmode=2 completion_nsec=2000000 \ + if ! _init_null_blk irqmode=2 completion_nsec=2000000 \ submit_queues=4 hw_queue_depth=1; then return 1 fi diff --git a/tests/block/022 b/tests/block/022 index 30b2a68..10851ff 100755 --- a/tests/block/022 +++ b/tests/block/022 @@ -28,7 +28,7 @@ test() { echo "Running ${TEST_NAME}" : "${TIMEOUT:=30}" - if ! _init_null_blk shared_tags=1 nr_devices=0 queue_mode=2; then + if ! _init_null_blk shared_tags=1 nr_devices=0; then return 1 fi diff --git a/tests/block/024 b/tests/block/024 index b40a869..6808db0 100755 --- a/tests/block/024 +++ b/tests/block/024 @@ -37,8 +37,7 @@ test() { # The maximum value for CONFIG_HZ is 1000. I.e., a tick is one # millisecond. So, make each I/O take half a millisecond. - if ! _init_null_blk queue_mode=2 irqmode=2 \ - completion_nsec=500000; then + if ! _init_null_blk irqmode=2 completion_nsec=500000; then return 1 fi diff --git a/tests/block/029 b/tests/block/029 index 0c4fe08..dcf4024 100755 --- a/tests/block/029 +++ b/tests/block/029 @@ -31,7 +31,7 @@ test() { local sq=/sys/kernel/config/nullb/nullb0/submit_queues : "${TIMEOUT:=30}" - _init_null_blk nr_devices=0 queue_mode=2 && + _init_null_blk nr_devices=0 && _configure_null_blk nullb0 completion_nsec=0 blocksize=512 \ size=16 memory_backed=1 power=1 && if { echo 1 >$sq; } 2>/dev/null; then diff --git a/tests/block/030 b/tests/block/030 index d2e5286..f08f772 100755 --- a/tests/block/030 +++ b/tests/block/030 @@ -22,7 +22,7 @@ test() { : "${TIMEOUT:=30}" # Legend: init_hctx=,,, # Set to $(nproc) + 1 to make loading of null_blk succeed. - if ! _init_null_blk nr_devices=0 queue_mode=2 \ + if ! _init_null_blk nr_devices=0 \ "init_hctx=$(nproc),100,$(($(nproc) + 1)),-1"; then echo "Loading null_blk failed" return 1 diff --git a/tests/block/031 b/tests/block/031 index cb4ba67..d253af8 100755 --- a/tests/block/031 +++ b/tests/block/031 @@ -18,7 +18,7 @@ test() { local fio_status bs=512 : "${TIMEOUT:=30}" - if ! _init_null_blk nr_devices=0 queue_mode=2 shared_tag_bitmap=1; then + if ! _init_null_blk nr_devices=0 shared_tag_bitmap=1; then echo "Loading null_blk failed" return 1 fi From patchwork Fri Jun 3 04:55:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868493 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 AD516C43334 for ; Fri, 3 Jun 2022 04:56:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238922AbiFCE4I (ORCPT ); Fri, 3 Jun 2022 00:56:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4H (ORCPT ); Fri, 3 Jun 2022 00:56:07 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D3EE36E10 for ; Thu, 2 Jun 2022 21:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=ixDonDx4pZck5vwWNGze/P7Iv4HXyJswPnnWQ1TEfvk=; b=LYexjoRoAeeGRlLxZc9t90rvpL wTb/9eTggeGT0J2/jFjLLny/LN3Ag1xYhJIJHwQ8UDgjsU6vv5EBe69jey9DELAyUe/Gtv2fc7Knx z6VyCtaJ7t0K6ytujhtMeQT+mZxJykomGjTd/cGwHHeZsmwgucuUGWHQZmQ6OUpl4VuLaMtepZ2ra EvdoWltN2hHGruBUJ96BkArb7wso5qR89Q/hV4K92rqQnuJdqf+zfWqzVZ3n6QTPTO+9TtMnliUIp 42tprUxwxDNyZKoq+WU049g25KDZ5YPz1GcsVrVjs/MZTqmhw8pOT7VRyDr3olaQW19vWERBbiZ7e iQTQCR5A==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzLx-005qOU-O3; Fri, 03 Jun 2022 04:56:06 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 02/13] common/null_blk: allow _configure_null_blk with built-in null_blk Date: Fri, 3 Jun 2022 06:55:47 +0200 Message-Id: <20220603045558.466760-3-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Test that do use _configure_null_blk already configure do not actually require a built-in null_blk driver. Relax the check in _have_null_blk to just require a driver instead of a module, and instead set a skip reason instead of failing in _init_null_blk when null_blk is built-in or otherwise not available. Signed-off-by: Christoph Hellwig --- common/null_blk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/null_blk b/common/null_blk index 6611db0..381f6b8 100644 --- a/common/null_blk +++ b/common/null_blk @@ -4,8 +4,10 @@ # # null_blk helper functions. +. common/shellcheck + _have_null_blk() { - _have_modules null_blk + _have_driver null_blk } _remove_null_blk_devices() { @@ -22,6 +24,7 @@ _init_null_blk() { if (( RUN_FOR_ZONED )); then zoned="zoned=1"; fi if ! modprobe -r null_blk || ! modprobe null_blk "$@" "${zoned}" ; then + SKIP_REASON="requires modular null_blk" return 1 fi From patchwork Fri Jun 3 04:55:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868494 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 F2F6CC433EF for ; Fri, 3 Jun 2022 04:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238990AbiFCE4K (ORCPT ); Fri, 3 Jun 2022 00:56:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4J (ORCPT ); Fri, 3 Jun 2022 00:56:09 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E218036E10 for ; Thu, 2 Jun 2022 21:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=AHlTnEABPKajxczRo37yzdEK5RP23lZjC9G/OFWN5v8=; b=YMC8bcHLx3QTX7BaoBKa9mD9zJ iTlbaDkGkb3tOE/9LU98UsT5LuNQaFxxW840cnrjG9pvHL2UteCVjrCqatj2CbVLFYrLV6tYK7y5h y6GCXHxFWlUcgZ8vC741bDZ8qiyZJuwK65wuZXsxYczD1EEgQjoI2bxYwvQD0bc5jv0ztbpDA3pZ5 7kxWFF1lndthO8R0KxZFAf1ma85Czz7JSxgyqN+YUM1zzl4CZv09+Z9OEiCc2DwNgXovjRR9hTzB7 rQOE6jeBqfjrl8J+HpXBKvkLEB1uMvB0uSwj4WXTjPtxRwTyWfxyTEAC5cJF8IuVLXcGAepn2FkoN xJHBGViA==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzM0-005qP1-6G; Fri, 03 Jun 2022 04:56:08 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 03/13] common/null_blk: respect RUN_FOR_ZONED in _configure_null_blk Date: Fri, 3 Jun 2022 06:55:48 +0200 Message-Id: <20220603045558.466760-4-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Create zoned devices in _configure_null_blk when RUN_FOR_ZONED is set, just like it is done in _init_null_blk Signed-off-by: Christoph Hellwig --- common/null_blk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/null_blk b/common/null_blk index 381f6b8..c82327d 100644 --- a/common/null_blk +++ b/common/null_blk @@ -38,6 +38,11 @@ _configure_null_blk() { shift mkdir "$nullb" || return $? + + if (( RUN_FOR_ZONED )); then + echo "1" > "$nullb/zoned" || return $? + fi + while [[ $# -gt 0 ]]; do param="${1%%=*}" val="${1#*=}" From patchwork Fri Jun 3 04:55:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868495 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 71610C433EF for ; Fri, 3 Jun 2022 04:56:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239001AbiFCE4N (ORCPT ); Fri, 3 Jun 2022 00:56:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4M (ORCPT ); Fri, 3 Jun 2022 00:56:12 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6016236E10 for ; Thu, 2 Jun 2022 21:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=fIIUnl2FFj3PC5UM3XNNeUdzjQLbccPKejN95eKVEjY=; b=TVgFNwI8c9NhQ5xObSl4eB9dXu xpQ+wrPm7ODCDNv1rDT8LbOLGQxn+0+ser4pUKAq+7ywXgmGDF/TEg1T6Ac8Ub6kZ2J6+qGqhduaI azJXoZcCIfx9NUJ8yq5y496tGyOYvbZtJ1JT5yKiEFFvCUlb63oowQaJPceiqu3WTeW4tKYMFUpYV zpy+Xe0b4w4U5K35ZsTHIjP6XApXI0NhG0WsSEedS2vJZQaXleSy/0sBI28vROKNcXVGN3uR7Mdqb Zn8GDZ/vsUkCTgaigu7CR0ZIXOAUhMwujDv1o4iQWbsVosQaN8Qtjn4ROlwKHbD1/lz5jt7NEim7m OCoE+Z9A==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzM2-005qPE-Kh; Fri, 03 Jun 2022 04:56:11 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 04/13] block/029: don't require modular null_blk Date: Fri, 3 Jun 2022 06:55:49 +0200 Message-Id: <20220603045558.466760-5-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Drop the call to _init_null_blk and just operate on nullb1 instead, leaving the default device alone. Signed-off-by: Christoph Hellwig --- tests/block/029 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/block/029 b/tests/block/029 index dcf4024..b9a897d 100755 --- a/tests/block/029 +++ b/tests/block/029 @@ -21,25 +21,24 @@ modify_nr_hw_queues() { num_cpus=$(nproc) while [ "$(_uptime_s)" -lt "$deadline" ]; do sleep .1 - echo 1 > /sys/kernel/config/nullb/nullb0/submit_queues + echo 1 > /sys/kernel/config/nullb/nullb1/submit_queues sleep .1 - echo "$num_cpus" > /sys/kernel/config/nullb/nullb0/submit_queues + echo "$num_cpus" > /sys/kernel/config/nullb/nullb1/submit_queues done } test() { - local sq=/sys/kernel/config/nullb/nullb0/submit_queues + local sq=/sys/kernel/config/nullb/nullb1/submit_queues : "${TIMEOUT:=30}" - _init_null_blk nr_devices=0 && - _configure_null_blk nullb0 completion_nsec=0 blocksize=512 \ + _configure_null_blk nullb1 completion_nsec=0 blocksize=512 \ size=16 memory_backed=1 power=1 && if { echo 1 >$sq; } 2>/dev/null; then modify_nr_hw_queues & fio --rw=randwrite --bs=4K --loops=$((10**6)) \ --iodepth=64 --group_reporting --sync=1 --direct=1 \ - --ioengine=libaio --filename="/dev/nullb0" \ - --runtime="${TIMEOUT}" --name=nullb0 \ + --ioengine=libaio --filename="/dev/nullb1" \ + --runtime="${TIMEOUT}" --name=nullb1 \ --output="${RESULTS_DIR}/block/fio-output-029.txt" \ >>"$FULL" wait From patchwork Fri Jun 3 04:55:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868496 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 C62F8C43334 for ; Fri, 3 Jun 2022 04:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239075AbiFCE4P (ORCPT ); Fri, 3 Jun 2022 00:56:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4O (ORCPT ); Fri, 3 Jun 2022 00:56:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2C4536E10 for ; Thu, 2 Jun 2022 21:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=YZqL45OZLXfGdFUrW98mhAIJnOCPS8lTW1cNSXZmPb8=; b=n/nXkNzj9wXiTA87jPUT8s/+f4 O0i25IiFtF02P8vxV+6mwiKgBdhJZ16az2GjS+iyPf3Vo3AkTqi7oH54Uck75AT9Q86q5WjM/sBHp SQclnUHm0gSTR7coCabkk0uS9elegJ0S9HcqhKECXaYwWKIE6+9t91MqNnD9Oxco2vbzlbHw/JUeo Bl7+KJpuAAxXOX7LqqBctDw6M8yAWJDRiVgO6M6Z4cnNujEt5YStOuTbKQvqjq7MaN8iWKfaI5Ahw /vQRfpGyLdSDKPUfGpkoaX55WJ0EPbikO3SNUMm9NbgTxnd9zPHvT76EDgSBYDe3qFb1eEU5P6M2J D9y0Va0A==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzM5-005qPg-3n; Fri, 03 Jun 2022 04:56:13 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 05/13] block/006: convert to use _configure_null_blk Date: Fri, 3 Jun 2022 06:55:50 +0200 Message-Id: <20220603045558.466760-6-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Switch to use _configure_null_blk so that built-in null_blk can be supported, which implies not using the default nullb0 device. Signed-off-by: Christoph Hellwig --- tests/block/006 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/block/006 b/tests/block/006 index 7ca1021..7d05b11 100755 --- a/tests/block/006 +++ b/tests/block/006 @@ -24,18 +24,18 @@ test() { _divide_timeout 2 FIO_PERF_FIELDS=("read iops") - if ! _init_null_blk submit_queues=2 blocking=1; then + if ! _configure_null_blk nullb1 submit_queues=2 blocking=1 power=1; then return 1 fi # run sync test _fio_perf --bs=4k --ioengine=sync --rw=randread --norandommap --name=sync \ - --filename=/dev/nullb0 --size=5g --direct=1 + --filename=/dev/nullb1 --size=5g --direct=1 # run async test _fio_perf --bs=4k --ioengine=libaio --iodepth=8 --numjobs="$(nproc)" \ --rw=randread --norandommap --name=async \ - --filename=/dev/nullb0 --size=5g --direct=1 + --filename=/dev/nullb1 --size=5g --direct=1 _exit_null_blk From patchwork Fri Jun 3 04:55:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868497 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 81B71C43334 for ; Fri, 3 Jun 2022 04:56:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239091AbiFCE4R (ORCPT ); Fri, 3 Jun 2022 00:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4Q (ORCPT ); Fri, 3 Jun 2022 00:56:16 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A8FB36E10 for ; Thu, 2 Jun 2022 21:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=MSo0KHkZgIYFHJZ42AzFvKbwN7oNudFzfkVTVPAxH7Q=; b=EhviBmHkbac3x9F4U1A2xBktJR 382bGEFW15AwamhBV9Oo5vPpUUYGLzf85YXaShwDT5jj72iEM5NhLGalrDeGpDhqSCk1P86KQpAth QTwlNL23VOLd/F/t+ZWI1+iS+VUPYxMznSdWEiwvCHYZy60KNfeQQo3RNuKnDmH37KG27N7yjwHcC PWIZjTdNWaLSP1cgdcy6A0T3kBPeUmPzFV48/Rd2KAQawqQyFf7ZBguO0zfwBib5ee1Uh1X7gmCUo GnGUMKn0qAi28+4AgpVUh64RE45BS8VT5f+mFr11YVYUNLPNUVwRR+twi/8wjZMguknYz0jBetSK/ ojKnRY3w==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzM7-005qQ5-Jr; Fri, 03 Jun 2022 04:56:16 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 06/13] block/016: convert to use _configure_null_blk Date: Fri, 3 Jun 2022 06:55:51 +0200 Message-Id: <20220603045558.466760-7-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Switch to use _configure_null_blk so that built-in null_blk can be supported, which implies not using the default nullb0 device. Signed-off-by: Christoph Hellwig --- tests/block/016 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/block/016 b/tests/block/016 index 2b7a05f..775069c 100755 --- a/tests/block/016 +++ b/tests/block/016 @@ -20,21 +20,22 @@ requires() { test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk irqmode=2 completion_nsec=2000000000; then + if ! _configure_null_blk nullb1 irqmode=2 completion_nsec=2000000000 \ + power=1; then return 1 fi # Start an I/O, which will take two seconds. - dd if=/dev/nullb0 of=/dev/null bs=512 iflag=direct count=1 status=none & + dd if=/dev/nullb1 of=/dev/null bs=512 iflag=direct count=1 status=none & sleep 0.5 # This will freeze the queue, and since we have an I/O in flight, it # will stay frozen until the I/O completes. - echo 64 > /sys/block/nullb0/queue/nr_requests & + echo 64 > /sys/block/nullb1/queue/nr_requests & sleep 0.5 # Do an I/O, which will wait for the queue to unfreeze. - dd if=/dev/nullb0 of=/dev/null bs=512 iflag=direct count=1 status=none & + dd if=/dev/nullb1 of=/dev/null bs=512 iflag=direct count=1 status=none & sleep 0.5 # While dd is blocked, send a signal which we know dd has a handler From patchwork Fri Jun 3 04:55:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868498 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 D35E1C43334 for ; Fri, 3 Jun 2022 04:56:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239077AbiFCE4W (ORCPT ); Fri, 3 Jun 2022 00:56:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4T (ORCPT ); Fri, 3 Jun 2022 00:56:19 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE6CC36E10 for ; Thu, 2 Jun 2022 21:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Z2CkPnYlffK5GNSK1h/kYKOR8TaKi66VozXAAmMXrbg=; b=A5uVjge1g08d/PxPAVODOTt2b3 HceGM5KRgdKRpIUvkj2yHdSpXz5LLJrinKjSW5PGUfVFWuiT36L5i++4ze1C48JTa4t/Hkl0BMViC vMZfYePAmvk+wgNtoUvK2fcKfn1xsziSEFnpfRt1q3rRMDxNlc589Vz5F6u2cUxMySZ8P+Ht/jKd5 wUA/Eq5O85XcwUfywa96iN3ywo472vBf9rLzyWFrFcSY69XE5bIEZYN6JzKkfP9EAV38JNpNgRwLM RzyKDM8j8UcufaghjidxffB0UDz5dCISPI9irUQ35AUY93MYbaCpuVKfV6kit8UwLguMffF2ygDYy unpAsHGQ==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzMA-005qQU-3P; Fri, 03 Jun 2022 04:56:18 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 07/13] block/017: convert to use _configure_null_blk Date: Fri, 3 Jun 2022 06:55:52 +0200 Message-Id: <20220603045558.466760-8-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Switch to use _configure_null_blk so that built-in null_blk can be supported, which implies not using the default nullb0 device. Signed-off-by: Christoph Hellwig --- tests/block/017 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/block/017 b/tests/block/017 index c84b661..8596888 100755 --- a/tests/block/017 +++ b/tests/block/017 @@ -19,23 +19,24 @@ requires() { show_inflight() { awk '{ printf "sysfs inflight reads %d\nsysfs inflight writes %d\n", $1, $2 }' \ - /sys/block/nullb0/inflight - awk '{ print "sysfs stat " $9 }' /sys/block/nullb0/stat - awk '$3 == "nullb0" { print "diskstats " $12 }' /proc/diskstats + /sys/block/nullb1/inflight + awk '{ print "sysfs stat " $9 }' /sys/block/nullb1/stat + awk '$3 == "nullb1" { print "diskstats " $12 }' /proc/diskstats } test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk irqmode=2 completion_nsec=500000000; then + if ! _configure_null_blk nullb1 irqmode=2 completion_nsec=500000000 \ + power=1; then return 1 fi - dd if=/dev/nullb0 of=/dev/null bs=4096 iflag=direct count=1 status=none & + dd if=/dev/nullb1 of=/dev/null bs=4096 iflag=direct count=1 status=none & sleep 0.1 show_inflight - dd if=/dev/zero of=/dev/nullb0 bs=4096 oflag=direct count=1 status=none & + dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1 status=none & sleep 0.1 show_inflight From patchwork Fri Jun 3 04:55:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868499 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 323F8CCA473 for ; Fri, 3 Jun 2022 04:56:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239102AbiFCE4Y (ORCPT ); Fri, 3 Jun 2022 00:56:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4W (ORCPT ); Fri, 3 Jun 2022 00:56:22 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B8F436E11 for ; Thu, 2 Jun 2022 21:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=2W4S3a1VuQDwEOsgchh+sd14l85+LMpS0eeU2cEnqkk=; b=EqbuXD9qdAwgI+wtrYZn1mRXdR ue0l5UpluoUNL5ZAplbjjy5BpOqz0o94ggZmO6ou+NM+sY9i7R9bP0T7ulANET0rc0va8FPPm5n2p ORZ5LIu8ihdkLMCI35hQffgSEiyFgQRzNatoP4GzGjvxi7NuXG6vk+dL4ELJzZ1lhzhcbFFe3ipL3 WSTS8Di68ULMBsrB+0rJWxQAvgF507kSDOAgndyG3hFpXt+92yLz+TfNxdwRemqswLH6b+/XEI0sQ synNSUrCbSMlokpKAh9lz6a3EQjo9SlO6oXSIAxwLZfno5CnbT40U2xmCXgFDxRG1fB2q2e29tLXZ heLlSU9A==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzMC-005qQw-I9; Fri, 03 Jun 2022 04:56:20 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 08/13] block/018: convert to use _configure_null_blk Date: Fri, 3 Jun 2022 06:55:53 +0200 Message-Id: <20220603045558.466760-9-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Switch to use _configure_null_blk so that built-in null_blk can be supported, which implies not using the default nullb0 device. Signed-off-by: Christoph Hellwig --- tests/block/018 | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/block/018 b/tests/block/018 index a80ecbc..e7ac445 100755 --- a/tests/block/018 +++ b/tests/block/018 @@ -15,13 +15,13 @@ requires() { } init_times() { - init_read_ms="$(awk '{ print $4 }' /sys/block/nullb0/stat)" - init_write_ms="$(awk '{ print $8 }' /sys/block/nullb0/stat)" + init_read_ms="$(awk '{ print $4 }' /sys/block/nullb1/stat)" + init_write_ms="$(awk '{ print $8 }' /sys/block/nullb1/stat)" } show_times() { - read_ms="$(awk '{ print $4 }' /sys/block/nullb0/stat)" - write_ms="$(awk '{ print $8 }' /sys/block/nullb0/stat)" + read_ms="$(awk '{ print $4 }' /sys/block/nullb1/stat)" + write_ms="$(awk '{ print $8 }' /sys/block/nullb1/stat)" # Print rounded to the nearest second printf 'read %d s\n' $(((read_ms - init_read_ms + 500) / 1000)) @@ -33,22 +33,23 @@ test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk irqmode=2 completion_nsec=1000000000; then + if ! _configure_null_blk nullb1 irqmode=2 completion_nsec=1000000000 \ + power=1; then return 1 fi init_times show_times - dd if=/dev/nullb0 of=/dev/null bs=4096 iflag=direct count=1 status=none + dd if=/dev/nullb1 of=/dev/null bs=4096 iflag=direct count=1 status=none show_times - dd if=/dev/zero of=/dev/nullb0 bs=4096 oflag=direct count=1 status=none + dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1 status=none show_times - dd if=/dev/nullb0 of=/dev/null bs=4096 iflag=direct count=1 status=none & - dd if=/dev/zero of=/dev/nullb0 bs=4096 oflag=direct count=1 status=none & - dd if=/dev/zero of=/dev/nullb0 bs=4096 oflag=direct count=1 status=none & + dd if=/dev/nullb1 of=/dev/null bs=4096 iflag=direct count=1 status=none & + dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1 status=none & + dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1 status=none & wait show_times From patchwork Fri Jun 3 04:55:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868500 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 09ED5C433EF for ; Fri, 3 Jun 2022 04:56:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239103AbiFCE4Z (ORCPT ); Fri, 3 Jun 2022 00:56:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4Y (ORCPT ); Fri, 3 Jun 2022 00:56:24 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B031136E11 for ; Thu, 2 Jun 2022 21:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=SqL/dT8JHaSK4BhmWma2PjJFslONxIxpXjyJPGhZHP4=; b=r8BEnNEZH2XQ7sr/BjuBqpVXzQ LrBfDA5bw6dPgAwqzs2hJjKEoSgY8YMJYKLDV7KR8wsuR6EVdTW4DCt+ishp81R49kt0tQJkKB5i7 dMX4lJ7wecc/EUSio/Qfh1WAFfYqywXuw716zhX+Rh/Lh/qhE10gXYHvstjGg9xi2nZmt62LAcmuk Z9uCKYcuEcnFJdft5uOc1aB2efgiDjUpVwCS+ogQPRINOAR25HC5P7Is2dSAsv8qUZThHkud9MZiJ t7SkYs/PyCrrjjaQ7iLeVg6C5TDKWh0co/eUnbdZPZV/W1fmc/nt7mQqvubFNAEdDhyXJr5VsE+xK WsNIhJwA==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzME-005qRK-Vt; Fri, 03 Jun 2022 04:56:23 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 09/13] block/020: convert to use _configure_null_blk Date: Fri, 3 Jun 2022 06:55:54 +0200 Message-Id: <20220603045558.466760-10-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Switch to use _configure_null_blk so that built-in null_blk can be supported, which implies not using the default nullb0 device. Signed-off-by: Christoph Hellwig --- tests/block/020 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/block/020 b/tests/block/020 index eef63cb..3e8cbbd 100755 --- a/tests/block/020 +++ b/tests/block/020 @@ -20,14 +20,14 @@ requires() { test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk irqmode=2 completion_nsec=2000000 \ - submit_queues=4 hw_queue_depth=1; then + if ! _configure_null_blk nullb1 irqmode=2 completion_nsec=2000000 \ + submit_queues=4 hw_queue_depth=1 power=1; then return 1 fi local scheds # shellcheck disable=SC2207 - scheds=($(sed 's/[][]//g' /sys/block/nullb0/queue/scheduler)) + scheds=($(sed 's/[][]//g' /sys/block/nullb1/queue/scheduler)) local max_iodepth=$(($(cat /proc/sys/fs/aio-max-nr) / $(nproc))) local iodepth=1024 @@ -36,10 +36,10 @@ test() { fi for sched in "${scheds[@]}"; do echo "Testing $sched" >> "$FULL" - echo "$sched" > /sys/block/nullb0/queue/scheduler + echo "$sched" > /sys/block/nullb1/queue/scheduler _fio_perf --bs=4k --ioengine=libaio --iodepth=$iodepth \ --numjobs="$(nproc)" --rw=randread --name=async \ - --filename=/dev/nullb0 --size=1g --direct=1 \ + --filename=/dev/nullb1 --size=1g --direct=1 \ --runtime=10 done From patchwork Fri Jun 3 04:55:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868501 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 38174C433EF for ; Fri, 3 Jun 2022 04:56:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239118AbiFCE41 (ORCPT ); Fri, 3 Jun 2022 00:56:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE41 (ORCPT ); Fri, 3 Jun 2022 00:56:27 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2944136E10 for ; Thu, 2 Jun 2022 21:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=dSY9q8SiyA9w6r6j8Ui3CeYMf/mJmCFyCSTGI67/BE0=; b=1QAVg16R+zhuapmh9DI8tHh0HI xSygLP/ZdDZbkRMztLJh1NEFO0PVJu5AUwCElsnQzC8i9e+hFyRO8pTIUyWOdPXcRDIonokXVGX33 u9evE++E9ziDrKdq4ZBL7M1H1h9G1k22LEzXNLIkS+2i2lwfBz/sVaDjBOUUY97odI+/qCEtUCPu6 QCcdQbAreywlY0TGue74k7emqk8hqgJN2iXzoonXfLM5kg17ROSnrJypI2bTt8Y7zPAiZ/jXuQmTV 2iSnVPLcvR1VrXOFWKR297XYyiDD+s2DTKrWu3WFi103Cz1iD4im/vK4XndZah8AG9uQvPGkenZnb j0wH4TpA==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzMH-005qRh-EB; Fri, 03 Jun 2022 04:56:25 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 10/13] block/021: convert to use _configure_null_blk Date: Fri, 3 Jun 2022 06:55:55 +0200 Message-Id: <20220603045558.466760-11-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Switch to use _configure_null_blk so that built-in null_blk can be supported, which implies not using the default nullb0 device. Signed-off-by: Christoph Hellwig --- tests/block/021 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/block/021 b/tests/block/021 index a1bbf45..89ebcd0 100755 --- a/tests/block/021 +++ b/tests/block/021 @@ -20,7 +20,7 @@ requires() { test() { echo "Running ${TEST_NAME}" - if ! _init_null_blk; then + if ! _configure_null_blk nullb1 power=1; then return 1 fi @@ -28,14 +28,14 @@ test() { local nr local scheds # shellcheck disable=SC2207 - scheds=($(sed 's/[][]//g' /sys/block/nullb0/queue/scheduler)) + scheds=($(sed 's/[][]//g' /sys/block/nullb1/queue/scheduler)) for sched in "${scheds[@]}"; do echo "Testing $sched" >> "$FULL" - echo "$sched" > /sys/block/nullb0/queue/scheduler - max_nr="$(cat /sys/block/nullb0/queue/nr_requests)" + echo "$sched" > /sys/block/nullb1/queue/scheduler + max_nr="$(cat /sys/block/nullb1/queue/nr_requests)" for ((nr = 4; nr <= max_nr; nr++)); do - echo "$nr" > /sys/block/nullb0/queue/nr_requests + echo "$nr" > /sys/block/nullb1/queue/nr_requests done done From patchwork Fri Jun 3 04:55:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868502 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 5C958C433EF for ; Fri, 3 Jun 2022 04:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239140AbiFCE4a (ORCPT ); Fri, 3 Jun 2022 00:56:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE43 (ORCPT ); Fri, 3 Jun 2022 00:56:29 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9646836E10 for ; Thu, 2 Jun 2022 21:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=G7ujCyVKhyPvJA4wlrg6HvpaYnbtQW+4ddquSb/OwFo=; b=c49+D/B4dN8Nq+IAUTczruaXtG 1jtli1V9P943T+WAcZ6xWRwxot4ymM4PtkZVLJNw7Ixb+shMpT4H7+J6wAdJ0SeRmw43CDld+b5Ar wRpvV0I/8hXE3aLYkx7BFbsnjgy5EIM+sxuFNZC+sAoZCAehUbhoDLf+BeVwoZuByvi+kQT3ksxZO K9jEmR7hPkU3URfmFuThmVEDRol52NP1/WqDXGuHoZtjFpn/oBuv5DGk6fth9QSlJoC+PzzpZ0X5+ f9d44Qu6kqfu/JglG+OKkaBkuEWvbZSS9+omtOaUGSsrTUkRtRoc1C9gEQ8fkSRpAjiHmR7vrK8hh Cre2SUVg==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzMJ-005qSE-S9; Fri, 03 Jun 2022 04:56:28 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 11/13] block/023: convert to use _configure_null_blk Date: Fri, 3 Jun 2022 06:55:56 +0200 Message-Id: <20220603045558.466760-12-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Switch to use _configure_null_blk so that built-in null_blk can be supported, which implies not using the default nullb0 device. Signed-off-by: Christoph Hellwig --- tests/block/023 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/block/023 b/tests/block/023 index 0f20f4a..b82f217 100755 --- a/tests/block/023 +++ b/tests/block/023 @@ -21,10 +21,11 @@ test() { local queue_mode for queue_mode in 0 2; do - if _init_null_blk gb=1 queue_mode="$queue_mode"; then + if _configure_null_blk nullb1 size=1048576 \ + queue_mode="$queue_mode" power=1; then echo "Queue mode $queue_mode" - dd if=/dev/nullb0 of=/dev/null iflag=direct bs=64k status=none - dd if=/dev/null of=/dev/nullb0 oflag=direct bs=64k status=none + dd if=/dev/nullb1 of=/dev/null iflag=direct bs=64k status=none + dd if=/dev/null of=/dev/nullb1 oflag=direct bs=64k status=none _exit_null_blk fi done From patchwork Fri Jun 3 04:55:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868503 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 EED14C433EF for ; Fri, 3 Jun 2022 04:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239157AbiFCE4d (ORCPT ); Fri, 3 Jun 2022 00:56:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4c (ORCPT ); Fri, 3 Jun 2022 00:56:32 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13B4536E10 for ; Thu, 2 Jun 2022 21:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=JeU7VryXXcal5oED3q371Aec/jIk1kAEDb5xYMDF3/I=; b=BTJYvl75J37/2UCGuwnBuAuNLd H+zcSzlhE1pak+K4XZYwOM9ufYMK2s5q1y9biZECQ+rtLkJvbe6uHV4f6AagQgOOmM4o+99xs0gPC SB8awguxYPha1+V4L3wlWAfwumiSZ1Uxkuby/vLRjsJtid88lr/RM37bxDwU9/y1XnbaMvZgN0tM9 dKnjjh57QplOUV0AJkkO5NSUzQWj5bauRTa64JBpWieZpexVmp2GszvPYHcy8leh0T1kcEC5iDkoV 43IBBUQn1Op2W0KE9KVAZ4kc0utV/woFAy0SaLwsX4h/cD0Xt60iZPGYL5oNxQF8DMf/iOtTU52Vi LcGTf8LA==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzMM-005qSa-Aj; Fri, 03 Jun 2022 04:56:30 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 12/13] block/024: convert to use _configure_null_blk Date: Fri, 3 Jun 2022 06:55:57 +0200 Message-Id: <20220603045558.466760-13-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Switch to use _configure_null_blk so that built-in null_blk can be supported, which implies not using the default nullb0 device. Signed-off-by: Christoph Hellwig --- tests/block/024 | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/block/024 b/tests/block/024 index 6808db0..2a7c934 100755 --- a/tests/block/024 +++ b/tests/block/024 @@ -17,13 +17,13 @@ requires() { } init_times() { - init_read_ms="$(awk '{ print $4 }' /sys/block/nullb0/stat)" - init_write_ms="$(awk '{ print $8 }' /sys/block/nullb0/stat)" + init_read_ms="$(awk '{ print $4 }' /sys/block/nullb1/stat)" + init_write_ms="$(awk '{ print $8 }' /sys/block/nullb1/stat)" } show_times() { - read_ms="$(awk '{ print $4 }' /sys/block/nullb0/stat)" - write_ms="$(awk '{ print $8 }' /sys/block/nullb0/stat)" + read_ms="$(awk '{ print $4 }' /sys/block/nullb1/stat)" + write_ms="$(awk '{ print $8 }' /sys/block/nullb1/stat)" # Print rounded to the nearest second printf 'read %d s\n' $(((read_ms - init_read_ms + 500) / 1000)) @@ -37,7 +37,8 @@ test() { # The maximum value for CONFIG_HZ is 1000. I.e., a tick is one # millisecond. So, make each I/O take half a millisecond. - if ! _init_null_blk irqmode=2 completion_nsec=500000; then + if ! _configure_null_blk nullb1 irqmode=2 completion_nsec=500000 \ + power=1; then return 1 fi @@ -46,16 +47,16 @@ test() { # 1500 * 0.5 ms is 0.75 seconds, allowing for some overhead so # that it rounds to one second. - dd if=/dev/nullb0 of=/dev/null bs=4096 iflag=direct count=1500 status=none + dd if=/dev/nullb1 of=/dev/null bs=4096 iflag=direct count=1500 status=none show_times - dd if=/dev/zero of=/dev/nullb0 bs=4096 oflag=direct count=1500 status=none + dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1500 status=none show_times # 1800 * 0.5 ms is 0.9 seconds. - dd if=/dev/nullb0 of=/dev/null bs=4096 iflag=direct count=1500 status=none & - dd if=/dev/zero of=/dev/nullb0 bs=4096 oflag=direct count=1800 status=none & - dd if=/dev/zero of=/dev/nullb0 bs=4096 oflag=direct count=1800 status=none & + dd if=/dev/nullb1 of=/dev/null bs=4096 iflag=direct count=1500 status=none & + dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1800 status=none & + dd if=/dev/zero of=/dev/nullb1 bs=4096 oflag=direct count=1800 status=none & wait show_times From patchwork Fri Jun 3 04:55:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12868504 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 5AE30C43334 for ; Fri, 3 Jun 2022 04:56:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239206AbiFCE4f (ORCPT ); Fri, 3 Jun 2022 00:56:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbiFCE4e (ORCPT ); Fri, 3 Jun 2022 00:56:34 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FAA136E10 for ; Thu, 2 Jun 2022 21:56:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=jqrgVGzy1obXQ34EADFADidNeaZkYzLm17/7aQR9VVw=; b=jYCUshwlHHBrYASzJ1AEfXy0N6 ypSWrP1ujp17qghbade4n566EERbF0PiIPnu4hg0kVdjjnSxiilySDttg9L5+Wsv8vqLVH1JpZHsu wLPdNu9/BfIz2rekJs/kaLI2bzAO2wmyFgXZQdTMntXFieW1M1rrXXcg5EOzkp42KsI9YjU8Z8qqf 4iLrLaLqb4502Jd8YzJ2DdkQGkKVjw/FgtSNNwGJ4XTb66zWIaSu9juxOcC1JOfQffrmXFMnkqffo tbfmB0x/ycsxDMzZBsAVPhntsQA1c/rQm7qMkOcRYykd6Y1Akz1AcPyvU2gqaMzjXm/OewXRAiO3s a0k+L2Sg==; Received: from [2001:4bb8:185:a81e:9865:e17e:4c0c:3e17] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwzMO-005qSu-P1; Fri, 03 Jun 2022 04:56:33 +0000 From: Christoph Hellwig To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 13/13] zbd: allow falling back to builtin null_blk Date: Fri, 3 Jun 2022 06:55:58 +0200 Message-Id: <20220603045558.466760-14-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220603045558.466760-1-hch@lst.de> References: <20220603045558.466760-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Use _configure_null_blk to configure the fallback device and thus allow for a built-in null_blk driver. Signed-off-by: Christoph Hellwig --- tests/zbd/rc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/zbd/rc b/tests/zbd/rc index 9deadc1..e56d607 100644 --- a/tests/zbd/rc +++ b/tests/zbd/rc @@ -13,7 +13,7 @@ group_requires() { _have_root && _have_program blkzone && _have_program dd && - _have_kernel_option BLK_DEV_ZONED && _have_modules null_blk && + _have_kernel_option BLK_DEV_ZONED && _have_null_blk && _have_module_param null_blk zoned } @@ -25,10 +25,11 @@ group_device_requires() { } _fallback_null_blk_zoned() { - if ! _init_null_blk zone_size=4 gb=1 zoned=1 ; then + if ! _configure_null_blk nullb1 zone_size=4 size=1048576 zoned=1 \ + power=1; then return 1 fi - echo /dev/nullb0 + echo /dev/nullb1 } #