All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nilay Shroff <nilay@linux.ibm.com>
To: Saravanan D <saravanand@crusoe.ai>, linux-block@vger.kernel.org
Cc: shinichiro.kawasaki@wdc.com, linux-nvme@lists.infradead.org,
	dwagner@suse.de, hare@suse.de, sagi@grimberg.me,
	kbusch@kernel.org, iyamahata@crusoe.ai, kiyer@crusoe.ai,
	ganbalagane@crusoe.ai, sjpark@crusoe.ai, bchen@crusoe.ai
Subject: Re: [PATCH blktests] nvme/081: test the per-queue io_cpu sysfs attribute
Date: Mon, 9 Nov 2026 19:13:27 +0530	[thread overview]
Message-ID: <7a2bcf1c-990f-46fa-badd-dc1b14dfa96f@linux.ibm.com> (raw)
In-Reply-To: <20261107095350.98072-1-saravanand@crusoe.ai>

On 11/7/26 3:23 PM, Saravanan D wrote:
> +test() {
> +	echo "Running ${TEST_NAME}"
> +
> +	_setup_nvmet
> +
> +	local cfs_path="${NVMET_CFS}/subsystems/${def_subsysnqn}"
> +	local skipped=false
> +	local nvmedev qdir cpu writer
> +
> +	_nvmet_target_setup --blkdev file
> +
> +	_nvme_connect_subsys --keep-alive-tmo 1 --reconnect-delay 2

How about adding connection option "--nr-io-queues 2"? If we add
this option then we may not need to have the requirement of
_require_min_cpus 2. I think, we shall be able to run this test
also on the system with only one cpu.

> +	_nvmf_wait_for_state "${def_subsysnqn}" "live"
> +	nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
> +	qdir="/sys/class/nvme/${nvmedev}/queues"
> +	cpu=$(last_online_cpu)
> +
Can we also add one more test here which tests whether "$qdir"
exists or not?

> +	if [[ ! -f "${qdir}/1/io_cpu" ]]; then
> +		SKIP_REASONS+=("missing per-queue io_cpu attribute")
> +		skipped=true
> +	elif [[ "$(nr_queue_dirs "${nvmedev}")" -lt 2 ]]; then
> +		SKIP_REASONS+=("controller has fewer than 2 I/O queues")
> +		skipped=true

I think using --nr-io-queues option would also replace the above relative
comparison with an exact comparison based on num of queues selected.

> +	else
> +		test_read_write "${qdir}" "${cpu}"
> +		test_reset "${nvmedev}" "${qdir}" "${cpu}"

The reset test could be updated to ensure that number of queues
remains unchanged after controller reset. Current test_reset()
verifies that the io_cpu and managed attributes retain their expected
values after reset. However, it doesn't explicitly verify that the
queue directories were recreated with the same count. I would capture
the queue_count before reset and compare it afterward as well as
ensure that queue_count matches with nr_queue_dirs.

Thanks,
--Nilay



  reply	other threads:[~2026-11-09 13:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07  9:53 [PATCH v8 0/2] nvme-tcp: allow setting per-queue io_cpu through sysfs Saravanan D
2026-11-07  9:53 ` [PATCH v8 1/2] nvme: add per-queue sysfs directories Saravanan D
2026-11-09 11:27   ` Nilay Shroff
2026-11-10 13:06   ` Hannes Reinecke
2026-11-07  9:53 ` [PATCH v8 2/2] nvme-tcp: allow setting per-queue io_cpu through sysfs Saravanan D
2026-11-09 11:40   ` Nilay Shroff
2026-11-10 13:09   ` Hannes Reinecke
2026-11-07  9:53 ` [PATCH blktests] nvme/081: test the per-queue io_cpu sysfs attribute Saravanan D
2026-11-09 13:43   ` Nilay Shroff [this message]
2026-11-10 11:49     ` Saravanan D
2026-11-10 11:50     ` [PATCH blktests v2] " Saravanan D
2026-11-11  8:47       ` Nilay Shroff

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=7a2bcf1c-990f-46fa-badd-dc1b14dfa96f@linux.ibm.com \
    --to=nilay@linux.ibm.com \
    --cc=bchen@crusoe.ai \
    --cc=dwagner@suse.de \
    --cc=ganbalagane@crusoe.ai \
    --cc=hare@suse.de \
    --cc=iyamahata@crusoe.ai \
    --cc=kbusch@kernel.org \
    --cc=kiyer@crusoe.ai \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=saravanand@crusoe.ai \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=sjpark@crusoe.ai \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.