From: Jens Axboe <axboe@kernel.dk>
To: Dan Ehrenberg <dehrenberg@google.com>
Cc: fio@vger.kernel.org, egouriou@google.com, nauman@google.com,
tirea@google.com
Subject: Re: [PATCH] New offset_increment option
Date: Thu, 15 Mar 2012 14:48:49 +0100 [thread overview]
Message-ID: <4F61F341.3020605@kernel.dk> (raw)
In-Reply-To: <4F61F1B2.6040809@kernel.dk>
On 03/15/2012 02:42 PM, Jens Axboe wrote:
> On 03/15/2012 12:19 AM, Dan Ehrenberg wrote:
>> This patch adds a new option to fio job files. It is described
>> in the HOWTO as follows:
>>
>> offset_increment=int If this is provided, then the real offset becomes
>> the offset + offset_increment * thread_number, where the
>> thread number is a counter that starts at 0 and is incremented
>> for each job. This option is useful if there are several jobs
>> which are intended to operate on a file in parallel in disjoint
>> segments, with even spacing between the starting points.
>
> This looks good. "Fixing" the math situation would be a bit more
> involved, though cool if we had support for doing arbitrary math.
>
> I have applied this, thanks Daniel!
OK, thinking about this, td->thread_number starts at _1_ and is
incremented for each job. So it doesn't _quite_ do what you describe
there, then you'd have to do:
+ f->file_offset = td->o.start_offset +
+ (td->thread_number - 1) * td->o.offset_increment;
instead. I think that's the more logical setup, and it is also what you
described. I'll fix the patch up.
--
Jens Axboe
prev parent reply other threads:[~2012-03-15 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 23:19 [PATCH] New offset_increment option Dan Ehrenberg
2012-03-15 13:42 ` Jens Axboe
2012-03-15 13:48 ` 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=4F61F341.3020605@kernel.dk \
--to=axboe@kernel.dk \
--cc=dehrenberg@google.com \
--cc=egouriou@google.com \
--cc=fio@vger.kernel.org \
--cc=nauman@google.com \
--cc=tirea@google.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