two patches
cover two patches
From: Vincent Fu <[email protected]>
Jens, please consider these two patches.
The first is a simple documentation fix, whereas the second has filesetup.c:setup_files() honor the offset option in one additional case.
Vincent Fu (2):
doc: clarify what --alloc-size does
filesetup: honor the offset option
HOWTO | 4 ++-- filesetup.c | 2 +- fio.1 | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/2 doc: clarify what --alloc-size does
From: Vincent Fu <[email protected]>
The alloc-size option actually directs fio to allocate additional shared memory pools of the specified size, augmenting the default allocation.
--- HOWTO | 4 ++-- fio.1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
HOWTO +2 -2
@@ -222,8 +222,8 @@ Command line options .. option:: --alloc-size=kb - Set the internal smalloc pool size to `kb` in KiB. The - ``--alloc-size`` switch allows one to use a larger pool size for smalloc. + Allocate additional internal smalloc pools of size `kb` in KiB. The + ``--alloc-size`` option increases shared memory set aside for use by fio. If running large jobs with randommap enabled, fio can run out of memory. Smalloc is an internal allocator for shared structures from a fixed size memory pool and can grow to 16 pools. The pool size defaults to 16MiB.
fio.1 +2 -2
@@ -112,8 +112,8 @@ only applies to job sections. The reserved *global* section is always parsed and used. .TP .BI \-\-alloc\-size \fR=\fPkb -Set the internal smalloc pool size to \fIkb\fR in KiB. The -\fB\-\-alloc\-size\fR switch allows one to use a larger pool size for smalloc. +Allocate additional internal smalloc pools of size \fIkb\fR in KiB. The +\fB\-\-alloc\-size\fR option increases shared memory set aside for use by fio. If running large jobs with randommap enabled, fio can run out of memory. Smalloc is an internal allocator for shared structures from a fixed size memory pool and can grow to 16 pools. The pool size defaults to 16MiB.
Signature · 1 line
2.17.1
PATCH 2/2 filesetup: honor the offset option
In reply to [email protected]From: Vincent Fu <[email protected]>
Commands like the following do not honor the value given by the offset option:
./fio --name=test --rw=randread --runtime=10s --offset=90% --time_based --ioengine=null --size=1T --norandommap --randrepeat=0 ./fio --name=test --size=8k --offset=4k
In the random case, eventually a random offset will be generated beyond the 1T file size, leading to a failure.
In the sequential case, a 12k file will be created despite size specifying the 8k end boundary.
This patch modifies setup_files() so that f->io_size incorporates the offset for cases like those above.
--- filesetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
filesetup.c +1 -1
@@ -1047,7 +1047,7 @@ int setup_files(struct thread_data *td)* doesn't divide nicely with the min blocksize, * make the first files bigger. */ - f->io_size = fs; + f->io_size = fs - f->file_offset;if (nr_fs_extra) { nr_fs_extra--; f->io_size += bs;
Signature · 1 line
2.17.1
Quoted 7 lines · On 9/11/19 8:56 AM, [email protected] wrote:
From: Vincent Fu <[email protected]>
Jens, please consider these two patches.
The first is a simple documentation fix, whereas the second has filesetup.c:setup_files() honor the offset option in one additional case.
Thanks Vincent, both look good. Applied.
Signature · 1 line
Jens Axboe