summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HOWTO4
-rw-r--r--engines/io_uring.c6
-rw-r--r--filesetup.c2
-rw-r--r--fio.14
4 files changed, 9 insertions, 7 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/engines/io_uring.c b/engines/io_uring.c
index a1b1324b..8c4bcc57 100644
--- a/engines/io_uring.c
+++ b/engines/io_uring.c
@@ -555,6 +555,7 @@ static int fio_ioring_post_init(struct thread_data *td)
return 1;
}
+ printf("files=%d\n", o->registerfiles);
if (o->registerfiles) {
err = fio_ioring_register_files(td);
if (err) {
@@ -613,7 +614,7 @@ static int fio_ioring_open_file(struct thread_data *td, struct fio_file *f)
struct ioring_data *ld = td->io_ops_data;
struct ioring_options *o = td->eo;
- if (!o->registerfiles)
+ if (!ld || !o->registerfiles)
return generic_open_file(td, f);
f->fd = ld->fds[f->engine_pos];
@@ -622,9 +623,10 @@ static int fio_ioring_open_file(struct thread_data *td, struct fio_file *f)
static int fio_ioring_close_file(struct thread_data *td, struct fio_file *f)
{
+ struct ioring_data *ld = td->io_ops_data;
struct ioring_options *o = td->eo;
- if (!o->registerfiles)
+ if (!ld || !o->registerfiles)
return generic_close_file(td, f);
f->fd = -1;
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;
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.