ddir = td->ddir + (!td->sequential << 1) + (td->iomix << 2);
if (!terse_output) {
- if (!job_add_num)
- fprintf(f_out, "%s: (g=%d): rw=%s, odir=%d, bs=%d-%d, rate=%d, ioengine=%s, iodepth=%d\n", td->name, td->groupid, ddir_str[ddir], td->odirect, td->min_bs, td->max_bs, td->rate, td->io_engine_name, td->iodepth);
- else if (job_add_num == 1)
+ if (!job_add_num) {
+ if (td->io_engine == FIO_CPUIO)
+ fprintf(f_out, "%s: ioengine=cpu, cpuload=%u, cpucycle=%u\n", td->name, td->cpuload, td->cpucycle);
+ else
+ fprintf(f_out, "%s: (g=%d): rw=%s, odir=%d, bs=%d-%d, rate=%d, ioengine=%s, iodepth=%d\n", td->name, td->groupid, ddir_str[ddir], td->odirect, td->min_bs, td->max_bs, td->rate, td->io_engine_name, td->iodepth);
+ } else if (job_add_num == 1)
fprintf(f_out, "...\n");
}
strcpy(td->io_engine_name, "splice");
td->io_engine = FIO_SPLICEIO;
return 0;
+ } else if (!strncmp(str, "cpu", 3)) {
+ strcpy(td->io_engine_name, "cpu");
+ td->io_engine = FIO_CPUIO;
+ return 0;
}
- log_err("fio: ioengine: { linuxaio, aio, libaio }, posixaio, sync, mmap, sgio, splice\n");
+ log_err("fio: ioengine: { linuxaio, aio, libaio }, posixaio, sync, mmap, sgio, splice, cpu\n");
return 1;
}
fgetpos(f, &off);
continue;
}
+ if (!check_int(p, "cpuload", &td->cpuload)) {
+ fgetpos(f, &off);
+ continue;
+ }
+ if (!check_int(p, "cpuchunks", &td->cpucycle)) {
+ fgetpos(f, &off);
+ continue;
+ }
if (!check_int(p, "thinktime", &td->thinktime)) {
fgetpos(f, &off);
continue;
printf("\t-l Generate per-job latency logs\n");
printf("\t-w Generate per-job bandwidth logs\n");
printf("\t-m Minimal (terse) output\n");
- printf("\t-f Job file (Required)\n");
printf("\t-v Print version info and exit\n");
}
switch (c) {
case 't':
def_timeout = atoi(optarg);
- idx++;
+ idx = optind;
break;
case 'l':
write_lat_log = 1;
- idx++;
+ idx = optind;
break;
case 'w':
write_bw_log = 1;
- idx++;
+ idx = optind;
break;
case 'o':
f_out = fopen(optarg, "w+");
exit(1);
}
f_err = f_out;
- idx++;
+ idx = optind;
break;
case 'm':
terse_output = 1;
- idx++;
+ idx = optind;
break;
case 'h':
usage(argv[0]);
ini_file[ini_idx - 1] = strdup(argv[idx]);
idx++;
}
-
+
if (!f_out) {
f_out = stdout;
f_err = stderr;