All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Omar Sandoval <osandov@osandov.com>, fio@vger.kernel.org
Cc: kernel-team@fb.com, Omar Sandoval <osandov@fb.com>
Subject: Re: [PATCH] Fix iodepth_batch=0
Date: Thu, 2 Jun 2016 09:45:49 -0600	[thread overview]
Message-ID: <575054AD.90306@kernel.dk> (raw)
In-Reply-To: <7d9e503153a511700809a945521613b3c03389f5.1464764641.git.osandov@fb.com>

On 06/01/2016 01:04 AM, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> The man page claims that iodepth_batch=0 falls back to whatever was
> specified for iodepth, but the enforced minimum of 1 means that 0 is not
> actually valid.
>
> Fixes: a2e6f8ac56a9 ("Make iodepth_batch=1 by default")
> Signed-off-by: Omar Sandoval <osandov@fb.com>

Probably a better idea to just adjust the check-and-set instead, ala the
below:

diff --git a/init.c b/init.c
index 7166ea766d8a..e82446ba6f2a 100644
--- a/init.c
+++ b/init.c
@@ -695,7 +695,8 @@ static int fixup_options(struct thread_data *td)
  	/*
  	 * If batch number isn't set, default to the same as iodepth
  	 */
-	if (o->iodepth_batch > o->iodepth || !o->iodepth_batch)
+	if (o->iodepth_batch > o->iodepth ||
+	    !fio_option_is_set(o, iodepth_batch))
  		o->iodepth_batch = o->iodepth;

  	/*

-- 
Jens Axboe



  reply	other threads:[~2016-06-02 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01  7:04 [PATCH] Fix iodepth_batch=0 Omar Sandoval
2016-06-02 15:45 ` Jens Axboe [this message]
2016-06-02 17:31   ` Omar Sandoval
2016-06-02 17:40     ` 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=575054AD.90306@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --cc=osandov@fb.com \
    --cc=osandov@osandov.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 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.