v3: ZBD fix with random zone index logic and missing documentation
A message that is not in the archive (sent off-list or not yet received): CGME20210804112704epcas5p2e74d90bf989d4305d5213971e0a30b63@epcas5p2.samsung.com
cover v3: ZBD fix with random zone index logic and missing documentation
v2 -> v2
- Added missing signoff tags with the patches
Ankit Kumar (2):
HOWTO: Add missing documentation for job_max_open_zones
zbd: Improve random zone index generation logic
HOWTO | 5 +++++ zbd.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
2.30.0-rc0
PATCH 1/2 HOWTO: Add missing documentation for job_max_open_zones
--- HOWTO | 5 +++++ 1 file changed, 5 insertions(+)
HOWTO +5 -0
@@ -1055,6 +1055,11 @@ Target file/device number of open zones is defined as the number of zones to which write commands are issued. +.. option:: job_max_open_zones=int + + Limit on the number of simultaneously opened zones per single + thread/process. + .. option:: zone_reset_threshold=float A number between zero and one that indicates the ratio of logical
Signature · 1 line
2.30.0-rc0
Re: [PATCH 1/2] HOWTO: Add missing documentation for job_max_open_zones
Quoted 10 lines · Ankit Kumar
Signed-off-by Ankit Kumar <[email protected]>--- HOWTO | 5 +++++ 1 file changed, 5 insertions(+)HOWTO +0
-0
HOWTO Target file/device · line 1062
Quoted 8 lines
HOWTO +5
-0@@ -1055,6 +1055,11 @@ Target file/device number of open zones is defined as the number of zones to which write commands are issued. +.. option:: job_max_open_zones=int + + Limit on the number of simultaneously opened zones per single + thread/process. +
Looks good to me.
Signature · 2 lines
Best Regards, Shin'ichiro Kawasaki
PATCH 2/2 zbd: Improve random zone index generation logic
In reply to Ankit KumarExisting random zone index generation logic is dependent on the file size. For smaller I/O sizes the random zone index always return a particular section of open zones. As this index is used to return one of the open zones, it was observed that after one of the max_open_zones / job_max_open_zones limit is reached all further I/O's are redirected to only a few open zones till they are full.
This patch modifies the random zone index genration logic so that it is uniform across all the open zones.
It reverts part of the commit 6463db6c1
('fio: fix interaction between offset/size limited threads and "max_open_zones"')
--- zbd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
zbd.c +3 -2
@@ -1184,11 +1184,12 @@ out:return res; } -/* Anything goes as long as it is not a constant. */ +/* Return random zone index for one of the open zones. */ static uint32_t pick_random_zone_idx (const struct fio_file *f,const struct io_u *io_u) { -return io_u->offset * f->zbd_info->num_open_zones / f->real_file_size; +return (io_u->offset - f->file_offset) * f->zbd_info->num_open_zones / + f->io_size; }/*
Signature · 1 line
2.30.0-rc0
Re: [PATCH 2/2] zbd: Improve random zone index generation logic
Quoted 7 lines · Ankit Kumar
Existing random zone index generation logic is dependent on the file size. For smaller I/O sizes the random zone index always return a particular section of open zones. As this index is used to return one of the open zones, it was observed that after one of the
max_open_zones/job_max_open_zoneslimit is reached all further I/O's are redirected to only a few open zones till they are full.
Quoted 8 lines
This patch modifies the random zone index genration logic so that it is uniform across all the open zones.
It reverts part of the commit
6463db6c1
('fio: fix interaction between offset/size limited threads and "max_open_zones"')Signed-off-by Ankit Kumar <[email protected]>
Looks good to me. Also, I confirmed that this patch improves the randomness of open zone selection, and it preserves the intent of the commit 6463db6c1.
Signature · 2 lines
Best Regards, Shin'ichiro Kawasaki
Jens Axboe
AppliedQuoted 11 lines · Ankit Kumar
v2 -> v2
- Added missing signoff tags with the patches
Ankit Kumar (2):
HOWTO: Add missing documentation forjob_max_open_zones
zbd: Improve random zone index generation logicHOWTO | 5 +++++ zbd.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-)
Applied, thanks.
Signature · 1 line
Jens Axboe