All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH blktests] block/020: dynamically change iodepth if test aio-nr lager than aio-max-nr
@ 2019-04-01  3:38 Xiao Liang
  2019-04-04 18:10 ` Omar Sandoval
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Liang @ 2019-04-01  3:38 UTC (permalink / raw)
  To: linux-block, osandov; +Cc: xiliang

When system has large count of cpus(eg. 96), the test failed as aio-nr over
aio-max-nr limitation.

This patch continues to use 1024 as default iodepth, but change it if
iodepth*$(nproc) > aio-max-nr.

Signed-off-by: Xiao Liang <xiliang@redhat.com>
---
 tests/block/020 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/block/020 b/tests/block/020
index 39dde66..f03c131 100755
--- a/tests/block/020
+++ b/tests/block/020
@@ -29,10 +29,16 @@ test() {
 	# shellcheck disable=SC2207
 	scheds=($(sed 's/[][]//g' /sys/block/nullb0/queue/scheduler))
 
+	aio_max_nr=$(cat /proc/sys/fs/aio-max-nr)
+	max_iodepth=$(($aio_max_nr/$(nproc)))
+	iodepth=1024
+	if (( $iodepth > $max_iodepth )); then
+		iodepth=$max_iodepth
+	fi
 	for sched in "${scheds[@]}"; do
 		echo "Testing $sched" >> "$FULL"
 		echo "$sched" > /sys/block/nullb0/queue/scheduler
-		_fio_perf --bs=4k --ioengine=libaio --iodepth=1024 \
+		_fio_perf --bs=4k --ioengine=libaio --iodepth=$iodepth \
 			--numjobs="$(nproc)" --rw=randread --name=async \
 			--filename=/dev/nullb0 --size=1g --direct=1 \
 			--runtime=10
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH blktests] block/020: dynamically change iodepth if test aio-nr lager than aio-max-nr
  2019-04-01  3:38 [PATCH blktests] block/020: dynamically change iodepth if test aio-nr lager than aio-max-nr Xiao Liang
@ 2019-04-04 18:10 ` Omar Sandoval
  0 siblings, 0 replies; 2+ messages in thread
From: Omar Sandoval @ 2019-04-04 18:10 UTC (permalink / raw)
  To: Xiao Liang; +Cc: linux-block, osandov

On Mon, Apr 01, 2019 at 11:38:00AM +0800, Xiao Liang wrote:
> When system has large count of cpus(eg. 96), the test failed as aio-nr over
> aio-max-nr limitation.
> 
> This patch continues to use 1024 as default iodepth, but change it if
> iodepth*$(nproc) > aio-max-nr.
> 
> Signed-off-by: Xiao Liang <xiliang@redhat.com>
> ---
>  tests/block/020 | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/block/020 b/tests/block/020
> index 39dde66..f03c131 100755
> --- a/tests/block/020
> +++ b/tests/block/020
> @@ -29,10 +29,16 @@ test() {
>  	# shellcheck disable=SC2207
>  	scheds=($(sed 's/[][]//g' /sys/block/nullb0/queue/scheduler))
>  
> +	aio_max_nr=$(cat /proc/sys/fs/aio-max-nr)
> +	max_iodepth=$(($aio_max_nr/$(nproc)))
> +	iodepth=1024
> +	if (( $iodepth > $max_iodepth )); then
> +		iodepth=$max_iodepth
> +	fi

This has a few shellcheck errors:

tests/block/020:33:17: note: $/${} is unnecessary on arithmetic variables. [SC2004]
tests/block/020:35:8: note: $/${} is unnecessary on arithmetic variables. [SC2004]
tests/block/020:35:19: note: $/${} is unnecessary on arithmetic variables. [SC2004]

Can you please address those and resend?

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-04 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01  3:38 [PATCH blktests] block/020: dynamically change iodepth if test aio-nr lager than aio-max-nr Xiao Liang
2019-04-04 18:10 ` Omar Sandoval

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.