All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Elliott, Robert (Servers)" <elliott@hpe.com>
To: Alexey Dobriyan <adobriyan@gmail.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: RE: [PATCH] fio: add for_each_rw_ddir() macro
Date: Wed, 12 Aug 2020 22:01:56 +0000	[thread overview]
Message-ID: <TU4PR8401MB10556465AD0CE9AF3A1E4B30AB420@TU4PR8401MB1055.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20200812152622.GA40719@localhost.localdomain>



> -----Original Message-----
> From: fio-owner@vger.kernel.org <fio-owner@vger.kernel.org> On Behalf
> Of Alexey Dobriyan
> Sent: Wednesday, August 12, 2020 10:26 AM
> To: axboe@kernel.dk
> Cc: fio@vger.kernel.org
> Subject: [PATCH] fio: add for_each_rw_ddir() macro
> 
> Make it slightly easier to add DDIR_APPEND as fully fledged I/O type.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
...

> @@ -662,31 +660,25 @@ static int fixup_options(struct thread_data
> *td)
...
>  	/*
>  	 * For random IO, allow blockalign offset other than min_bs.
>  	 */
> -	if (!o->ba[DDIR_READ] || !td_random(td))
> -		o->ba[DDIR_READ] = o->min_bs[DDIR_READ];
> -	if (!o->ba[DDIR_WRITE] || !td_random(td))
> -		o->ba[DDIR_WRITE] = o->min_bs[DDIR_WRITE];
> -	if (!o->ba[DDIR_TRIM] || !td_random(td))
> -		o->ba[DDIR_TRIM] = o->min_bs[DDIR_TRIM];
> +	for_each_rw_ddir(ddir) {
> +		if (!o->ba[ddir] || !td_random(td))
> +			o->ba[ddir] = o->min_bs[ddir];
> +	}
> 
>  	if ((o->ba[DDIR_READ] != o->min_bs[DDIR_READ] ||
>  	    o->ba[DDIR_WRITE] != o->min_bs[DDIR_WRITE] ||

continues as:
            o->ba[DDIR_TRIM] != o->min_bs[DDIR_TRIM]) &&
            !o->norandommap) {

which should be updated too.


> @@ -765,14 +757,12 @@ static int fixup_options(struct thread_data
> *td)
>  		log_err("fio: rate and rate_iops are mutually
> exclusive\n");
>  		ret |= 1;
>  	}
> -	if ((o->rate[DDIR_READ] && (o->rate[DDIR_READ] < o->ratemin[DDIR_READ])) ||
> -	    (o->rate[DDIR_WRITE] && (o->rate[DDIR_WRITE] < o->ratemin[DDIR_WRITE])) ||
> -	    (o->rate[DDIR_TRIM] && (o->rate[DDIR_TRIM] < o->ratemin[DDIR_TRIM])) ||
> -	    (o->rate_iops[DDIR_READ] && (o->rate_iops[DDIR_READ] < o->rate_iops_min[DDIR_READ])) ||
> -	    (o->rate_iops[DDIR_WRITE] && (o->rate_iops[DDIR_WRITE] < o->rate_iops_min[DDIR_WRITE])) ||
> -	    (o->rate_iops[DDIR_TRIM] && (o->rate_iops[DDIR_TRIM] < o->rate_iops_min[DDIR_TRIM]))) {
> -		log_err("fio: minimum rate exceeds rate\n");
> -		ret |= 1;
> +	for_each_rw_ddir(ddir) {
> +		if ((o->rate[ddir] && (o->rate[ddir] < o->ratemin[ddir])) ||
> +		    (o->rate_iops[ddir] && (o->rate_iops[ddir] < o->rate_iops_min[ddir]))) {
> +			log_err("fio: minimum rate exceeds rate\n");
> +			ret |= 1;
> +		}
>  	}

That changes the behavior slightly - you can now get up to three of
those messages. Printing the value of ddir would help identify the
problem(s) and be more informative than the current single message.


  reply	other threads:[~2020-08-12 22:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 15:26 [PATCH] fio: add for_each_rw_ddir() macro Alexey Dobriyan
2020-08-12 22:01 ` Elliott, Robert (Servers) [this message]
2020-08-13 10:36   ` Alexey Dobriyan
2020-08-13 16:33   ` [PATCH v2] " Alexey Dobriyan
2020-08-17  4:01     ` Jens Axboe

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=TU4PR8401MB10556465AD0CE9AF3A1E4B30AB420@TU4PR8401MB1055.NAMPRD84.PROD.OUTLOOK.COM \
    --to=elliott@hpe.com \
    --cc=adobriyan@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    /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 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.