From: Daniel Wagner <dwagner@suse.de>
To: linux-nvme@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Chaitanya Kulkarni <kch@nvidia.com>,
Shin'ichiro Kawasaki <shinichiro@fastmail.com>,
Hannes Reinecke <hare@suse.de>, Daniel Wagner <dwagner@suse.de>
Subject: [PATCH blktests v3 10/12] nvme/rc: Calculate IO size for random fio jobs
Date: Wed, 3 May 2023 10:02:56 +0200 [thread overview]
Message-ID: <20230503080258.14525-11-dwagner@suse.de> (raw)
In-Reply-To: <20230503080258.14525-1-dwagner@suse.de>
_nvme_calc_run_io_size() returns the jobs size for _run_fio_rand_io()
function. The jobs size is the size per job, thus we have to divide
through the number of CPUs.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
tests/nvme/045 | 4 +++-
tests/nvme/047 | 6 ++++--
tests/nvme/rc | 10 ++++++++++
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/tests/nvme/045 b/tests/nvme/045
index 99012f6bed8f..f50087cccb6a 100755
--- a/tests/nvme/045
+++ b/tests/nvme/045
@@ -31,6 +31,7 @@ test() {
local ctrlkey
local new_ctrlkey
local ctrldev
+ local rand_io_size
echo "Running ${TEST_NAME}"
@@ -120,7 +121,8 @@ test() {
nvmedev=$(_find_nvme_dev "${subsys_name}")
- _run_fio_rand_io --size=4m --filename="/dev/${nvmedev}n1"
+ rand_io_size="$(_nvme_calc_rand_io_size 4m)"
+ _run_fio_rand_io --size="${rand_io_size}" --filename="/dev/${nvmedev}n1"
_nvme_disconnect_subsys "${subsys_name}"
diff --git a/tests/nvme/047 b/tests/nvme/047
index b5a8d469a983..6a7599bc2e91 100755
--- a/tests/nvme/047
+++ b/tests/nvme/047
@@ -25,6 +25,7 @@ test() {
local port
local nvmedev
local loop_dev
+ local rand_io_size
local file_path="$TMPDIR/img"
local subsys_name="blktests-subsystem-1"
@@ -42,7 +43,8 @@ test() {
nvmedev=$(_find_nvme_dev "${subsys_name}")
- _xfs_run_fio_verify_io /dev/"${nvmedev}n1" "1m" || echo FAIL
+ rand_io_size="$(_nvme_calc_rand_io_size 4M)"
+ _run_fio_rand_io --filename="/dev/${nvmedev}n1" --size="${rand_io_size}"
_nvme_disconnect_subsys "${subsys_name}" >> "$FULL" 2>&1
@@ -50,7 +52,7 @@ test() {
--nr-write-queues 1 \
--nr-poll-queues 1 || echo FAIL
- _xfs_run_fio_verify_io /dev/"${nvmedev}n1" "1m" || echo FAIL
+ _run_fio_rand_io --filename="/dev/${nvmedev}n1" --size="${rand_io_size}"
_nvme_disconnect_subsys "${subsys_name}" >> "$FULL" 2>&1
diff --git a/tests/nvme/rc b/tests/nvme/rc
index 0b4d5f6570d6..268418e5b3e0 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -150,6 +150,16 @@ _test_dev_nvme_nsid() {
cat "${TEST_DEV_SYSFS}/nsid"
}
+_nvme_calc_rand_io_size() {
+ local img_size_mb
+ local io_size_kb
+
+ img_size_mb="$(convert_to_mb "$1")"
+ io_size_kb="$(((img_size_mb * 1024) / $(OMP_THREAD_LIMIT=32 nproc)))"
+
+ echo "${io_size_kb}k"
+}
+
_nvme_fcloop_add_rport() {
local local_wwnn="$1"
local local_wwpn="$2"
--
2.40.0
next prev parent reply other threads:[~2023-05-03 8:03 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 8:02 [PATCH blktests v3 00/12] nvme testsuite runtime optimization Daniel Wagner
2023-05-03 8:02 ` [PATCH blktests v3 01/12] nvme/rc: Auto convert test device size info Daniel Wagner
2023-05-03 9:22 ` Chaitanya Kulkarni
2023-05-03 9:26 ` Daniel Wagner
2023-05-07 22:49 ` Shinichiro Kawasaki
2023-05-03 8:02 ` [PATCH blktests v3 02/12] nvme: Do not hard code device size for dd test Daniel Wagner
2023-05-03 9:23 ` Chaitanya Kulkarni
2023-05-07 22:51 ` Shinichiro Kawasaki
2023-05-03 8:02 ` [PATCH blktests v3 03/12] common/xfs: Make size argument optional for _xfs_run_fio_verify_io Daniel Wagner
2023-05-03 9:25 ` Chaitanya Kulkarni
2023-05-03 8:02 ` [PATCH blktests v3 04/12] common/xfs: Limit fio size job to fit into xfs fs Daniel Wagner
2023-05-03 9:29 ` Chaitanya Kulkarni
2023-05-03 9:42 ` Daniel Wagner
2023-05-03 8:02 ` [PATCH blktests v3 05/12] nvme: Use runtime fio background jobs Daniel Wagner
2023-05-07 22:56 ` Shinichiro Kawasaki
2023-05-03 8:02 ` [PATCH blktests v3 06/12] Documentation: Add info on nvme_tr_type Daniel Wagner
2023-05-03 9:32 ` Chaitanya Kulkarni
2023-05-07 23:21 ` Shinichiro Kawasaki
2023-05-03 8:02 ` [PATCH blktests v3 07/12] nvme: Make test image size configurable Daniel Wagner
2023-05-03 9:32 ` Chaitanya Kulkarni
2023-05-07 23:09 ` Shinichiro Kawasaki
2023-05-03 8:02 ` [PATCH blktests v3 08/12] nvme/rc: Add minimal test image size requirement Daniel Wagner
2023-05-03 9:35 ` Chaitanya Kulkarni
2023-05-07 23:19 ` Shinichiro Kawasaki
2023-05-03 8:02 ` [PATCH blktests v3 09/12] common/fio: Limit number of random jobs Daniel Wagner
2023-05-03 9:41 ` Chaitanya Kulkarni
2023-05-03 11:01 ` Daniel Wagner
2023-05-04 5:16 ` Chaitanya Kulkarni
2023-05-04 6:07 ` Daniel Wagner
2023-05-03 8:02 ` Daniel Wagner [this message]
2023-05-07 23:31 ` [PATCH blktests v3 10/12] nvme/rc: Calculate IO size for random fio jobs Shinichiro Kawasaki
2023-05-10 17:14 ` Daniel Wagner
2023-05-03 8:02 ` [PATCH blktests v3 11/12] nvme/rc: Move discovery generation counter code to rc Daniel Wagner
2023-05-07 23:34 ` Shinichiro Kawasaki
2023-05-10 17:24 ` Daniel Wagner
2023-05-11 16:44 ` Shinichiro Kawasaki
2023-05-03 8:02 ` [PATCH blktests v3 12/12] nvme: Make the number iterations configurable Daniel Wagner
2023-05-03 9:45 ` Chaitanya Kulkarni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230503080258.14525-11-dwagner@suse.de \
--to=dwagner@suse.de \
--cc=hare@suse.de \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=shinichiro@fastmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox