sections can be specified.
--alloc-size=kb Set smalloc pool to this size in kb (def 1024)
--warnings-fatal Fio parser warnings are fatal
+ --max-jobs Maximum number of threads/processes to support
Any parameters following the options will be assumed to be job files,
#include "fio.h"
-static char run_str[MAX_JOBS + 1];
+static char run_str[REAL_MAX_JOBS + 1];
/*
* Sets the status of the 'td' in the printed status map.
set_genesis_time();
while (todo) {
- struct thread_data *map[MAX_JOBS];
+ struct thread_data *map[REAL_MAX_JOBS];
struct timeval this_start;
int this_jobs = 0, left;
#define RAND_MAP_IDX(f, b) (TO_MAP_BLOCK(f, b) / BLOCKS_PER_MAP)
#define RAND_MAP_BIT(f, b) (TO_MAP_BLOCK(f, b) & (BLOCKS_PER_MAP - 1))
-#define MAX_JOBS (2048)
+#define REAL_MAX_JOBS 2048
#define td_non_fatal_error(e) ((e) == EIO || (e) == EILSEQ)
#define FIO_RANDSEED (0xb1899bedUL)
static char **ini_file;
-static int max_jobs = MAX_JOBS;
+static int max_jobs = FIO_MAX_JOBS;
static int dump_cmdline;
static struct thread_data def_thread;
.has_arg = no_argument,
.val = 'w',
},
+ {
+ .name = (char *) "max-jobs",
+ .has_arg = required_argument,
+ .val = 'j',
+ },
{
.name = NULL,
},
printf("\t--alloc-size=kb\tSet smalloc pool to this size in kb"
" (def 1024)\n");
printf("\t--warnings-fatal Fio parser warnings are fatal\n");
+ printf("\t--max-jobs\tMaximum number of threads/processes to support\n");
printf("\nFio was written by Jens Axboe <jens.axboe@oracle.com>");
printf("\n Jens Axboe <jaxboe@fusionio.com>\n");
}
case 'w':
warnings_fatal = 1;
break;
+ case 'j':
+ max_jobs = atoi(optarg);
+ if (!max_jobs || max_jobs > REAL_MAX_JOBS) {
+ log_err("fio: invalid max jobs: %d\n", max_jobs);
+ do_exit++;
+ exit_val = 1;
+ }
+ break;
default:
do_exit++;
exit_val = 1;
#define OS_MAP_ANON MAP_ANON
+/*
+ * OSX has a pitifully small shared memory segment by default,
+ * so default to a lower number of max jobs supported
+ */
+#define FIO_MAX_JOBS 128
+
typedef off_t off64_t;
/* OS X as of 10.6 doesn't have the timer_* functions.
#define FIO_PREFERRED_ENGINE "sync"
#endif
+#ifndef FIO_MAX_JOBS
+#define FIO_MAX_JOBS 2048
+#endif
+
#ifndef FIO_HAVE_BLKTRACE
static inline int is_blktrace(const char *fname)
{