From: Jens Axboe <axboe@kernel.dk>
To: Jiri Horky <jiri.horky@gmail.com>, fio@vger.kernel.org
Subject: Re: [PATCH] Allow to reset offset_increment counter
Date: Fri, 23 May 2014 10:59:58 -0600 [thread overview]
Message-ID: <537F7E8E.4050200@kernel.dk> (raw)
In-Reply-To: <537F439E.9040904@gmail.com>
On 2014-05-23 06:48, Jiri Horky wrote:
> Hi all,
>
> because I got bitten by this multiple times I decided to give this patch
> a try :)
>
> Current implementation of offset calculation when offset_increment is in
> effect uses global thread_number as follows:
> f->file_offset = td->o.start_offset + (td->thread_number - 1) *
> td->o.offset_increment;
>
> The thread number gets incremented for every job (subjob) so even you
> have multiple jobs with different filenames, the offset calculation is
> shared. I find this very unintuitive, especially in cases the offsets
> gets past the device/file. For example, if one wants to run sequential
> read test in 16 threads of multiple devices (/dev/sd{b,c,d}) in one
> group, which are of 1TB size, and to eliminate caching effect he wants
> each read to start at different offset, the config could look like
> following:
Maybe it would be better to have this offset calculation be on a
per-thread-per-file basis? You are right in that it only makes sense
within the same file or device, so maybe it'd be better to make it work
more like you expect.
--
Jens Axboe
next prev parent reply other threads:[~2014-05-23 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 12:48 [PATCH] Allow to reset offset_increment counter Jiri Horky
2014-05-23 16:59 ` Jens Axboe [this message]
2014-05-23 17:24 ` Jiri Horky
2014-06-02 18:28 ` Jiri Horky
2014-07-25 7:47 ` Jiri Horky
2014-07-25 7:51 ` 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=537F7E8E.4050200@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=jiri.horky@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox