.queue = fio_cpuio_queue,
.init = fio_cpuio_init,
.open_file = fio_cpuio_open,
- .flags = FIO_SYNCIO | FIO_DISKLESSIO,
+ .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_NOIO,
};
static void fio_init fio_cpuio_register(void)
/*
* device/file sizes are zero and no size given, punt
*/
- if ((!total_size || total_size == -1ULL) && !td->o.size) {
+ if ((!total_size || total_size == -1ULL) && !td->o.size &&
+ !(td->io_ops->flags & FIO_NOIO)) {
log_err("%s: you need to specify size=\n", td->o.name);
td_verror(td, EINVAL, "total_file_size");
return 1;
static void reap_threads(int *nr_running, int *t_rate, int *m_rate)
{
struct thread_data *td;
- int i, cputhreads, pending, status, ret;
+ int i, cputhreads, realthreads, pending, status, ret;
/*
* reap exited threads (TD_EXITED -> TD_REAPED)
*/
- pending = cputhreads = 0;
+ realthreads = pending = cputhreads = 0;
for_each_td(td, i) {
int flags = 0;
*/
if (td->io_ops && !strcmp(td->io_ops->name, "cpuio"))
cputhreads++;
+ else
+ realthreads++;
if (!td->pid || td->runstate == TD_REAPED)
continue;
exit_value++;
}
- if (*nr_running == cputhreads && !pending)
+ if (*nr_running == cputhreads && !pending && realthreads)
terminate_threads(TERMINATE_ALL);
}
FIO_NOEXTEND = 1 << 3, /* engine can't extend file */
FIO_NODISKUTIL = 1 << 4, /* diskutil can't handle filename */
FIO_UNIDIR = 1 << 5, /* engine is uni-directional */
+ FIO_NOIO = 1 << 6, /* thread does only pseudo IO */
};
enum fio_file_flags {
return 1;
}
+ memset(threads, 0, max_jobs * sizeof(struct thread_data));
atexit(free_shm);
return 0;
}