All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Sitsofe Wheeler <sitsofe@gmail.com>
Cc: Jeff Furlong <jeff.furlong@wdc.com>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: fio offset with ba
Date: Thu, 26 Oct 2017 07:25:59 -0700	[thread overview]
Message-ID: <5aed99f6-657f-31ca-5869-70371525e4d9@kernel.dk> (raw)
In-Reply-To: <CALjAwxjkGNPQrT0A4eZz2zFzU=UhDyzZg1z71G65PhAu-H04CA@mail.gmail.com>

On 10/25/2017 11:27 PM, Sitsofe Wheeler wrote:
> On 26 October 2017 at 05:24, Jens Axboe <axboe@kernel.dk> wrote:
>> On 10/25/2017 05:27 PM, Jeff Furlong wrote:
>>>> Actually here's a question - what does .interval do?
>>> Looks like it is used to override the default value of 1 in gopt_new_int():
>>>       interval = 1.0;
>>>       if (o->interval)
>>>               interval = o->interval;
>>>       i->spin = gtk_spin_button_new_with_range(o->minval, maxval, interval);
>>>
>>> But your larger question may be why do some options have interval
>>> (e.g. offset) and some not have interval (e.g. ioengine).
>>
>> It's for the GUI, where you want to specify in which increments a value
>> is adjusted when you use the up and down arrows to change it. It's only
>> applicable to numberical values, it would not make sense to apply to
>> something like ioengine or similar.
> 
> You were right Jeff - it was a larger question. Jens thanks for
> clearing up its purpose - I missed it was used by the GUI.
> 
>>> diff --git a/filesetup.c b/filesetup.c
>>> index 7a602d4..5d7ea5c 100644
>>> --- a/filesetup.c
>>> +++ b/filesetup.c
>>> @@ -869,12 +869,10 @@ uint64_t get_start_offset(struct thread_data *td, struct fio_file *f)
>>>
>>>       if (o->start_offset_percent > 0) {
>>>               /*
>>> -              * if blockalign is provided, find the min across read, write,
>>> -              * and trim
>>> +              * if offset_align is provided, set initial offset
>>>                */
>>> -             if (fio_option_is_set(o, ba)) {
>>> -                     align_bs = (unsigned long long) min(o->ba[DDIR_READ], o->ba[DDIR_WRITE]);
>>> -                     align_bs = min((unsigned long long) o->ba[DDIR_TRIM], align_bs);
>>> +             if (fio_option_is_set(o, start_offset_align)) {
>>> +                     align_bs = o->start_offset_align;
>>
>> I'm curious why this drops the 'ba' part?
> 
> blockalign actually only impacts random I/O (see
> https://github.com/axboe/fio/issues/341 for someone requesting it to
> affect sequential I/O but that's a separate issue). Since each random
> I/O will "blockalign itself" we gain nothing from trying to align the
> offset generated by offset percentage to it.

Gotcha. That's my only comment on the patch, if folks are happy with it,
we can slide it in.

-- 
Jens Axboe



      reply	other threads:[~2017-10-26 14:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20 19:08 fio offset with ba Jeff Furlong
2017-10-20 21:01 ` Sitsofe Wheeler
2017-10-21  0:13   ` Jeff Furlong
2017-10-21  4:21     ` Sitsofe Wheeler
2017-10-23 23:56       ` Jeff Furlong
2017-10-24  6:21         ` Sitsofe Wheeler
2017-10-26  0:27           ` Jeff Furlong
2017-10-26  4:24             ` Jens Axboe
2017-10-26  6:27               ` Sitsofe Wheeler
2017-10-26 14:25                 ` Jens Axboe [this message]

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=5aed99f6-657f-31ca-5869-70371525e4d9@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=jeff.furlong@wdc.com \
    --cc=sitsofe@gmail.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.