Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] zbd: Fix test case #48 failure
@ 2020-10-30  6:57 Shin'ichiro Kawasaki
  2020-10-30  6:57 ` [PATCH v2 1/2] zbd: Avoid excessive zone resets Shin'ichiro Kawasaki
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shin'ichiro Kawasaki @ 2020-10-30  6:57 UTC (permalink / raw)
  To: fio, Jens Axboe
  Cc: Damien Le Moal, Dmitry Fomichev, Naohiro Aota,
	Shinichiro Kawasaki

When t/zbd/test-zoned-support is run for zoned block devices with slow zone
reset command operation, test case #48 fails. This series addresses the failure
with two fixes. First patch avoids excessive and repeated zone resets which
resulted in too long runtime and test timeout. Second patch fixes wrong test
target range of the test case which triggered unnecessary zone resets.

Changes from v1:
* Added reviewed-by tag

Shin'ichiro Kawasaki (2):
  zbd: Avoid excessive zone resets
  t/zbd: Fix test target size of test case #48

 t/zbd/test-zbd-support | 2 +-
 zbd.c                  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.26.2



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

* [PATCH v2 1/2] zbd: Avoid excessive zone resets
  2020-10-30  6:57 [PATCH v2 0/2] zbd: Fix test case #48 failure Shin'ichiro Kawasaki
@ 2020-10-30  6:57 ` Shin'ichiro Kawasaki
  2020-10-30  6:57 ` [PATCH v2 2/2] t/zbd: Fix test target size of test case #48 Shin'ichiro Kawasaki
  2020-10-30 13:25 ` [PATCH v2 0/2] zbd: Fix test case #48 failure Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Shin'ichiro Kawasaki @ 2020-10-30  6:57 UTC (permalink / raw)
  To: fio, Jens Axboe
  Cc: Damien Le Moal, Dmitry Fomichev, Naohiro Aota,
	Shinichiro Kawasaki

When zbd_reset_zone() is called for a zone repeatedly, reset zone command
is issued multiple times to a single zone even though its status is
empty. This is excessive and meaningless. Especially when zones are reset
at file set up with multiple jobs, zone reset is repeated for each job
and delays fio work load start.

To avoid the repeated zone resets, check the write pointer of the zone
before issuing zone reset command. If the write pointer is at the zone
start, do not reset the zone and just return.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
---
 zbd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/zbd.c b/zbd.c
index 905c0c2b..9327816a 100644
--- a/zbd.c
+++ b/zbd.c
@@ -718,6 +718,9 @@ static int zbd_reset_zone(struct thread_data *td, struct fio_file *f,
 	uint64_t length = (z+1)->start - offset;
 	int ret = 0;
 
+	if (z->wp == z->start)
+		return 0;
+
 	assert(is_valid_offset(f, offset + length - 1));
 
 	dprint(FD_ZBD, "%s: resetting wp of zone %u.\n", f->file_name,
-- 
2.26.2



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

* [PATCH v2 2/2] t/zbd: Fix test target size of test case #48
  2020-10-30  6:57 [PATCH v2 0/2] zbd: Fix test case #48 failure Shin'ichiro Kawasaki
  2020-10-30  6:57 ` [PATCH v2 1/2] zbd: Avoid excessive zone resets Shin'ichiro Kawasaki
@ 2020-10-30  6:57 ` Shin'ichiro Kawasaki
  2020-10-30 13:25 ` [PATCH v2 0/2] zbd: Fix test case #48 failure Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Shin'ichiro Kawasaki @ 2020-10-30  6:57 UTC (permalink / raw)
  To: fio, Jens Axboe
  Cc: Damien Le Moal, Dmitry Fomichev, Naohiro Aota,
	Shinichiro Kawasaki

Option --size was not specified to the fio command of test case #48. It
resulted in write operations to all available sequential write required
zones and relaxed zone locking test condition. Specify the option to
limit test target to 16 zones so that zone locking is tested with
expected condition.

Fixes: 3bd2078bdd1c ("zbd: add test for stressing zone locking")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
---
 t/zbd/test-zbd-support | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support
index 248423bb..acde3b3a 100755
--- a/t/zbd/test-zbd-support
+++ b/t/zbd/test-zbd-support
@@ -913,7 +913,7 @@ test48() {
     for ((i=0;i<jobs;i++)); do
 	opts+=("--name=job$i" "--filename=$dev" "--offset=$off" "--bs=16K")
 	opts+=("--io_size=$zone_size" "--iodepth=256" "--thread=1")
-	opts+=("--group_reporting=1")
+	opts+=("--size=$size" "--group_reporting=1")
 	# max_open_zones is already specified
 	opts+=($(job_var_opts_exclude "--max_open_zones"))
     done
-- 
2.26.2



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

* Re: [PATCH v2 0/2] zbd: Fix test case #48 failure
  2020-10-30  6:57 [PATCH v2 0/2] zbd: Fix test case #48 failure Shin'ichiro Kawasaki
  2020-10-30  6:57 ` [PATCH v2 1/2] zbd: Avoid excessive zone resets Shin'ichiro Kawasaki
  2020-10-30  6:57 ` [PATCH v2 2/2] t/zbd: Fix test target size of test case #48 Shin'ichiro Kawasaki
@ 2020-10-30 13:25 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2020-10-30 13:25 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki, fio
  Cc: Damien Le Moal, Dmitry Fomichev, Naohiro Aota

On 10/30/20 12:57 AM, Shin'ichiro Kawasaki wrote:
> When t/zbd/test-zoned-support is run for zoned block devices with slow zone
> reset command operation, test case #48 fails. This series addresses the failure
> with two fixes. First patch avoids excessive and repeated zone resets which
> resulted in too long runtime and test timeout. Second patch fixes wrong test
> target range of the test case which triggered unnecessary zone resets.

Applied, thanks.

-- 
Jens Axboe



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

end of thread, other threads:[~2020-10-30 13:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-30  6:57 [PATCH v2 0/2] zbd: Fix test case #48 failure Shin'ichiro Kawasaki
2020-10-30  6:57 ` [PATCH v2 1/2] zbd: Avoid excessive zone resets Shin'ichiro Kawasaki
2020-10-30  6:57 ` [PATCH v2 2/2] t/zbd: Fix test target size of test case #48 Shin'ichiro Kawasaki
2020-10-30 13:25 ` [PATCH v2 0/2] zbd: Fix test case #48 failure Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox