Re: [PATCH] New offset_increment option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux