projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dump io_u on timeout
[fio.git]
/
init.c
diff --git
a/init.c
b/init.c
index 9e7fb2c055e62a17ceac9dbf78757d1b83bd357c..c8f27ade76e7f2aafaef4e98320d189c2a26e347 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-90,6
+90,12
@@
static struct fio_option options[] = {
.help = "Amount of IO buffers to keep in flight",
.def = "1",
},
.help = "Amount of IO buffers to keep in flight",
.def = "1",
},
+ {
+ .name = "iodepth_low",
+ .type = FIO_OPT_INT,
+ .off1 = td_var_offset(iodepth_low),
+ .help = "Low water mark for queuing depth",
+ },
{
.name = "size",
.type = FIO_OPT_STR_VAL,
{
.name = "size",
.type = FIO_OPT_STR_VAL,
@@
-644,6
+650,12
@@
static void fixup_options(struct thread_data *td)
*/
if (td->thinktime_spin > td->thinktime)
td->thinktime_spin = td->thinktime;
*/
if (td->thinktime_spin > td->thinktime)
td->thinktime_spin = td->thinktime;
+
+ /*
+ * The low water mark cannot be bigger than the iodepth
+ */
+ if (td->iodepth_low > td->iodepth || !td->iodepth_low)
+ td->iodepth_low = td->iodepth;
}
/*
}
/*
@@
-713,7
+725,7
@@
static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
if (td->directory && td->directory[0] != '\0') {
if (lstat(td->directory, &sb) < 0) {
log_err("fio: %s is not a directory\n", td->directory);
if (td->directory && td->directory[0] != '\0') {
if (lstat(td->directory, &sb) < 0) {
log_err("fio: %s is not a directory\n", td->directory);
- td_verror(td, errno);
+ td_verror(td, errno
, "lstat"
);
return 1;
}
if (!S_ISDIR(sb.st_mode)) {
return 1;
}
if (!S_ISDIR(sb.st_mode)) {
@@
-752,9
+764,9
@@
static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
fio_sem_init(&td->mutex, 0);
fio_sem_init(&td->mutex, 0);
- td->
clat_stat[0].min_val = td->
clat_stat[1].min_val = ULONG_MAX;
- td->
slat_stat[0].min_val = td->
slat_stat[1].min_val = ULONG_MAX;
- td->
bw_stat[0].min_val = td->
bw_stat[1].min_val = ULONG_MAX;
+ td->
ts.clat_stat[0].min_val = td->ts.
clat_stat[1].min_val = ULONG_MAX;
+ td->
ts.slat_stat[0].min_val = td->ts.
slat_stat[1].min_val = ULONG_MAX;
+ td->
ts.bw_stat[0].min_val = td->ts.
bw_stat[1].min_val = ULONG_MAX;
if (td->stonewall && td->thread_number > 1)
groupid++;
if (td->stonewall && td->thread_number > 1)
groupid++;
@@
-765,11
+777,11
@@
static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
goto err;
if (td->write_lat_log) {
goto err;
if (td->write_lat_log) {
- setup_log(&td->slat_log);
- setup_log(&td->clat_log);
+ setup_log(&td->
ts.
slat_log);
+ setup_log(&td->
ts.
clat_log);
}
if (td->write_bw_log)
}
if (td->write_bw_log)
- setup_log(&td->bw_log);
+ setup_log(&td->
ts.
bw_log);
if (!td->name)
td->name = strdup(jobname);
if (!td->name)
td->name = strdup(jobname);
@@
-838,12
+850,12
@@
int init_random_state(struct thread_data *td)
fd = open("/dev/urandom", O_RDONLY);
if (fd == -1) {
fd = open("/dev/urandom", O_RDONLY);
if (fd == -1) {
- td_verror(td, errno);
+ td_verror(td, errno
, "open"
);
return 1;
}
if (read(fd, seeds, sizeof(seeds)) < (int) sizeof(seeds)) {
return 1;
}
if (read(fd, seeds, sizeof(seeds)) < (int) sizeof(seeds)) {
- td_verror(td, EIO);
+ td_verror(td, EIO
, "read"
);
close(fd);
return 1;
}
close(fd);
return 1;
}
@@
-895,6
+907,8
@@
static int is_empty_or_comment(char *line)
for (i = 0; i < strlen(line); i++) {
if (line[i] == ';')
return 1;
for (i = 0; i < strlen(line); i++) {
if (line[i] == ';')
return 1;
+ if (line[i] == '#')
+ return 1;
if (!isspace(line[i]) && !iscntrl(line[i]))
return 0;
}
if (!isspace(line[i]) && !iscntrl(line[i]))
return 0;
}
@@
-1030,7
+1044,7
@@
static int str_ioengine_cb(void *data, const char *str)
if (td->io_ops)
return 0;
if (td->io_ops)
return 0;
- log_err("fio: ioengine= libaio, posixaio, sync, mmap, sgio, splice, cpu, null\n");
+ log_err("fio: ioengine= libaio, posixaio, sync,
syslet-rw,
mmap, sgio, splice, cpu, null\n");
log_err("fio: or specify path to dynamic ioengine module\n");
return 1;
}
log_err("fio: or specify path to dynamic ioengine module\n");
return 1;
}