Add softrandommap and --alloc-size options
The softrandommap job option allows fio to continue if it cannot
allocate from the smalloc backing for the random map. Or the user
can specify --alloc-size with a size larger than the default of 1024k
to increase the size of the shared allocation pool.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index effe63c..1dfaa1f 100644
--- a/init.c
+++ b/init.c
@@ -119,6 +119,11 @@
.val = 'x',
},
{
+ .name = "alloc-size",
+ .has_arg = required_argument,
+ .val = 'a',
+ },
+ {
.name = NULL,
},
};
@@ -826,6 +831,8 @@
printf("\t--readonly\tTurn on safety read-only checks, preventing"
" writes\n");
printf("\t--section=name\tOnly run specified section in job file\n");
+ printf("\t--alloc-size=kb\tSet smalloc pool to this size in kb"
+ " (def 1024)\n");
}
#ifdef FIO_INC_DEBUG
@@ -897,6 +904,9 @@
while ((c = getopt_long_only(argc, argv, "", l_opts, &lidx)) != -1) {
switch (c) {
+ case 'a':
+ smalloc_pool_size = atoi(optarg);
+ break;
case 't':
def_timeout = atoi(optarg);
break;