From: Omar Sandoval <osandov@osandov.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: Omar Sandoval <osandov@fb.com>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org
Subject: Re: [PATCH blktests] block/020: test IO req allocation
Date: Tue, 22 May 2018 17:01:54 -0700 [thread overview]
Message-ID: <20180523000154.GI9536@vader> (raw)
In-Reply-To: <20180522111249.14136-1-ming.lei@redhat.com>
On Tue, May 22, 2018 at 07:12:49PM +0800, Ming Lei wrote:
> IO request allocation may hang for ever if the allocation process
> migrages. This test covers the request allocation code path.
>
> The following patch can fix this issue on linus kernel:
>
> https://marc.info/?l=linux-block&m=152671586923185&w=2
>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
> tests/block/020 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
> tests/block/020.out | 2 ++
> 2 files changed, 52 insertions(+)
> create mode 100755 tests/block/020
> create mode 100755 tests/block/020.out
>
> diff --git a/tests/block/020 b/tests/block/020
> new file mode 100755
> index 000000000000..b102d7f12173
> --- /dev/null
> +++ b/tests/block/020
> @@ -0,0 +1,50 @@
> +#!/bin/bash
> +#
> +# Test blk-mq IO request allocation.
This isn't very descriptive. How about
Test blk-mq request allocation when hardware tags are limited.
Additionally, for regression tests for specific patches, please
reference what patch it is testing. In this case, it'd be
Regression test for patch "blk-mq: avoid to starve tag allocation after
allocation process migrates".
> +# Copyright (C) 2018 Ming Lei <ming.lei@redhat.com>
> +#
> +# This program is free software: you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation, either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program. If not, see <http://www.gnu.org/licenses/>.
> +
> +DESCRIPTION="check if IO req allocation may hang"
A better description would say what this test actually does. In this
case, something like
DESCRIPTION="run null-blk on different schedulers with only one hardware tag"
I can fix this and apply when the discussion on the patch itself
settles. Thanks, Ming!
> +QUICK=1
> +
> +requires() {
> + _have_module null_blk && _have_fio
> +}
> +
> +test() {
> + echo "Running ${TEST_NAME}"
> +
> + modprobe -r null_blk
> + modprobe null_blk queue_mode=2 irqmode=2 completion_nsec=2000000 \
> + shared_tags=1 submit_queues=4 hw_queue_depth=1 || continue
> +
> + local scheds
> + # shellcheck disable=SC2207
> + scheds=($(sed 's/[][]//g' /sys/block/nullb0/queue/scheduler))
> +
> + for sched in "${scheds[@]}"; do
> + echo "Testing $sched" >> "$FULL"
> + echo "$sched" > /sys/block/nullb0/queue/scheduler
> + _fio_perf --bs=4k --ioengine=libaio --iodepth=1024 \
> + --numjobs="$(nproc)" --rw=randread --name=async \
> + --filename=/dev/nullb0 --size=1g --direct=1 \
> + --runtime=10
> + done
> +
> + modprobe -r null_blk
> +
> + echo "Test complete"
> +}
> diff --git a/tests/block/020.out b/tests/block/020.out
> new file mode 100755
> index 000000000000..dcb584d22e3e
> --- /dev/null
> +++ b/tests/block/020.out
> @@ -0,0 +1,2 @@
> +Running block/020
> +Test complete
> --
> 2.9.5
>
next prev parent reply other threads:[~2018-05-23 0:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 11:12 [PATCH blktests] block/020: test IO req allocation Ming Lei
2018-05-23 0:01 ` Omar Sandoval [this message]
2018-05-23 0:37 ` Ming Lei
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=20180523000154.GI9536@vader \
--to=osandov@osandov.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=osandov@fb.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;
as well as URLs for NNTP newsgroup(s).