* bsrange doesn't accept separate read,write values
@ 2011-07-23 18:53 Dave Engberg
2011-07-23 18:59 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Dave Engberg @ 2011-07-23 18:53 UTC (permalink / raw)
To: fio
The 'bs' and 'bssplit' configuration variables accept separate numbers for read and write operations if you separate them with a comma. For example:
bssplit=1k/39:8k/50:64k/11,1k/29:8k/50:64k/21
The documentation for 'bsrange' says it works the same way, but if I try to specify two ranges with a comma, I get an error when I run the app. E.g. if I put this line in the configuration file:
bsrange=1k-16k,2k-32k
I get this error output:
fio: pid=26861, err=22/file:engines/sync.c:62, func=xfer, error=Invalid argument
Here's my attempt at a patch for this:
*** fio-1.57-orig/parse.c 2011-07-14 11:20:25.000000000 -0700
--- fio-1.57/parse.c 2011-07-23 11:38:12.000000000 -0700
***************
*** 453,458 ****
--- 453,464 ----
strncpy(tmp, ptr, sizeof(tmp) - 1);
+ // Handle bsrange with separate read,write values:
+ p1 = strchr(tmp, ',');
+ if (p1) {
+ *p1 = '\0';
+ }
+
p1 = strchr(tmp, '-');
if (!p1) {
p1 = strchr(tmp, ':');
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bsrange doesn't accept separate read,write values
2011-07-23 18:53 bsrange doesn't accept separate read,write values Dave Engberg
@ 2011-07-23 18:59 ` Jens Axboe
2011-07-23 19:04 ` Dave Engberg
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2011-07-23 18:59 UTC (permalink / raw)
To: Dave Engberg; +Cc: fio
On 2011-07-23 20:53, Dave Engberg wrote:
> The 'bs' and 'bssplit' configuration variables accept separate numbers for read and write operations if you separate them with a comma. For example:
> bssplit=1k/39:8k/50:64k/11,1k/29:8k/50:64k/21
>
> The documentation for 'bsrange' says it works the same way, but if I try to specify two ranges with a comma, I get an error when I run the app. E.g. if I put this line in the configuration file:
> bsrange=1k-16k,2k-32k
>
> I get this error output:
>
> fio: pid=26861, err=22/file:engines/sync.c:62, func=xfer, error=Invalid argument
>
> Here's my attempt at a patch for this:
>
>
> *** fio-1.57-orig/parse.c 2011-07-14 11:20:25.000000000 -0700
> --- fio-1.57/parse.c 2011-07-23 11:38:12.000000000 -0700
> ***************
> *** 453,458 ****
> --- 453,464 ----
>
> strncpy(tmp, ptr, sizeof(tmp) - 1);
>
> + // Handle bsrange with separate read,write values:
> + p1 = strchr(tmp, ',');
> + if (p1) {
> + *p1 = '\0';
> + }
> +
> p1 = strchr(tmp, '-');
> if (!p1) {
> p1 = strchr(tmp, ':');
>
Does this actually work, do you get the ranges set correctly? bssplit
has a separate parse handler for the range.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bsrange doesn't accept separate read,write values
2011-07-23 18:59 ` Jens Axboe
@ 2011-07-23 19:04 ` Dave Engberg
2011-07-23 19:05 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Dave Engberg @ 2011-07-23 19:04 UTC (permalink / raw)
To: Jens Axboe; +Cc: fio@vger.kernel.org
Yes, it appears to work for me. E.g. if I use this:
bsrange=512-23k,1k-42k
Then fio emits this at start-up:
job1: (g=0): rw=randrw, bs=512-23K/1K-42K, ioengine=sync, iodepth=1
On 7/23/11 11:59 AM, Jens Axboe wrote:
> Does this actually work, do you get the ranges set correctly? bssplit
> has a separate parse handler for the range.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bsrange doesn't accept separate read,write values
2011-07-23 19:04 ` Dave Engberg
@ 2011-07-23 19:05 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2011-07-23 19:05 UTC (permalink / raw)
To: Dave Engberg; +Cc: fio@vger.kernel.org
On 2011-07-23 21:04, Dave Engberg wrote:
>
> Yes, it appears to work for me. E.g. if I use this:
> bsrange=512-23k,1k-42k
>
> Then fio emits this at start-up:
> job1: (g=0): rw=randrw, bs=512-23K/1K-42K, ioengine=sync, iodepth=1
That's great. Perhaps you could look into simplifying the bssrange
option next, then :-)
I'll apply this one, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-23 19:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-23 18:53 bsrange doesn't accept separate read,write values Dave Engberg
2011-07-23 18:59 ` Jens Axboe
2011-07-23 19:04 ` Dave Engberg
2011-07-23 19:05 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox