* [PATCH 0/2] two patches
@ 2019-09-11 14:56 vincentfu
2019-09-11 14:56 ` [PATCH 1/2] doc: clarify what --alloc-size does vincentfu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: vincentfu @ 2019-09-11 14:56 UTC (permalink / raw)
To: axboe, fio; +Cc: Vincent Fu
From: Vincent Fu <vincent.fu@wdc.com>
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(-)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] doc: clarify what --alloc-size does
2019-09-11 14:56 [PATCH 0/2] two patches vincentfu
@ 2019-09-11 14:56 ` vincentfu
2019-09-11 14:56 ` [PATCH 2/2] filesetup: honor the offset option vincentfu
2019-09-11 15:00 ` [PATCH 0/2] two patches Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: vincentfu @ 2019-09-11 14:56 UTC (permalink / raw)
To: axboe, fio; +Cc: Vincent Fu
From: Vincent Fu <vincent.fu@wdc.com>
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(-)
diff --git a/HOWTO b/HOWTO
index 6b449e97..4fef1504 100644
--- a/HOWTO
+++ b/HOWTO
@@ -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.
diff --git a/fio.1 b/fio.1
index e0283f7f..77a2d799 100644
--- a/fio.1
+++ b/fio.1
@@ -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.
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] filesetup: honor the offset option
2019-09-11 14:56 [PATCH 0/2] two patches vincentfu
2019-09-11 14:56 ` [PATCH 1/2] doc: clarify what --alloc-size does vincentfu
@ 2019-09-11 14:56 ` vincentfu
2019-09-11 15:00 ` [PATCH 0/2] two patches Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: vincentfu @ 2019-09-11 14:56 UTC (permalink / raw)
To: axboe, fio; +Cc: Vincent Fu
From: Vincent Fu <vincent.fu@wdc.com>
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(-)
diff --git a/filesetup.c b/filesetup.c
index 7904d187..b8d1d838 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -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;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] two patches
2019-09-11 14:56 [PATCH 0/2] two patches vincentfu
2019-09-11 14:56 ` [PATCH 1/2] doc: clarify what --alloc-size does vincentfu
2019-09-11 14:56 ` [PATCH 2/2] filesetup: honor the offset option vincentfu
@ 2019-09-11 15:00 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2019-09-11 15:00 UTC (permalink / raw)
To: vincentfu, fio; +Cc: Vincent Fu
On 9/11/19 8:56 AM, vincentfu@gmail.com wrote:
> From: Vincent Fu <vincent.fu@wdc.com>
>
> 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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-11 15:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-11 14:56 [PATCH 0/2] two patches vincentfu
2019-09-11 14:56 ` [PATCH 1/2] doc: clarify what --alloc-size does vincentfu
2019-09-11 14:56 ` [PATCH 2/2] filesetup: honor the offset option vincentfu
2019-09-11 15:00 ` [PATCH 0/2] two patches Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox