Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Ankit Kumar <ankit.kumar@samsung.com>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>,
	"krish.reddy@samsung.com" <krish.reddy@samsung.com>,
	"prakash.v@samsung.com" <prakash.v@samsung.com>
Subject: Re: [PATCH 2/2] zbd: Improve random zone index generation logic.
Date: Wed, 4 Aug 2021 05:59:18 +0000	[thread overview]
Message-ID: <20210804055918.ngmj2u6wotztmctd@shindev> (raw)
In-Reply-To: <1627986516-4814-3-git-send-email-ankit.kumar@samsung.com>

On Aug 03, 2021 / 15:58, Ankit Kumar wrote:
> 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_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.
> ---
>  zbd.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/zbd.c b/zbd.c
> index 04c68de..43f12b4 100644
> --- a/zbd.c
> +++ b/zbd.c
> @@ -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;
>  }

One nit I suggest is to remove the period in the commit message title. Other
than that, I confirmed the change is good. I confirmed that it improves the
randomness of the open zone choice. It reverts the part of the commit 6463db6c1
('fio: fix interaction between offset/size limited threads and
"max_open_zones"'), but I confirmed that still the intent of the commit
6463db6c1 is kept after applying this change.

Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

-- 
Best Regards,
Shin'ichiro Kawasaki

  reply	other threads:[~2021-08-04  5:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210803111208epcas5p2fec4fec945de52fb57986f2ef5e2bcfe@epcas5p2.samsung.com>
2021-08-03 10:28 ` [PATCH 0/2] ZBD fix with random zone index logic and missing documentation Ankit Kumar
2021-08-03 10:28   ` [PATCH 1/2] Add missing documentation for job_max_open_zones Ankit Kumar
2021-08-04  5:52     ` Shinichiro Kawasaki
2021-08-03 10:28   ` [PATCH 2/2] zbd: Improve random zone index generation logic Ankit Kumar
2021-08-04  5:59     ` Shinichiro Kawasaki [this message]
     [not found] <CGME20210804092859epcas5p1085bcaafa631e16cc3ad4325b883172e@epcas5p1.samsung.com>
2021-08-04  9:24 ` [PATCH 0/2] v2: ZBD fix with random zone index logic and missing documentation Ankit Kumar
2021-08-04  9:24   ` [PATCH 2/2] zbd: Improve random zone index generation logic Ankit Kumar
     [not found] <CGME20210804112710epcas5p4d9ef2bfa2d2327b6e4ae27e1cad3aba6@epcas5p4.samsung.com>
2021-08-04 11:23 ` [PATCH 0/2] v3: ZBD fix with random zone index logic and missing documentation Ankit Kumar
2021-08-04 11:23   ` [PATCH 2/2] zbd: Improve random zone index generation logic Ankit Kumar
2021-08-04 12:04     ` Shinichiro Kawasaki

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=20210804055918.ngmj2u6wotztmctd@shindev \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=ankit.kumar@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=krish.reddy@samsung.com \
    --cc=prakash.v@samsung.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