Commit | Line | Data |
---|---|---|
2866c82d JA |
1 | #include "fio.h" |
2 | #include "os.h" | |
3 | ||
ea2877a4 JA |
4 | static int fio_cpuio_setup(struct thread_data fio_unused *td) |
5 | { | |
6 | return 0; | |
7 | } | |
8 | ||
2866c82d JA |
9 | static int fio_cpuio_init(struct thread_data *td) |
10 | { | |
11 | if (!td->cpuload) { | |
12 | td_vmsg(td, EINVAL, "cpu thread needs rate"); | |
13 | return 1; | |
14 | } else if (td->cpuload > 100) | |
15 | td->cpuload = 100; | |
16 | ||
17 | td->read_iolog = td->write_iolog = 0; | |
53cdc686 | 18 | td->nr_files = 0; |
2866c82d JA |
19 | |
20 | return 0; | |
21 | } | |
22 | ||
23 | struct ioengine_ops ioengine = { | |
24 | .name = "cpuio", | |
25 | .version = FIO_IOOPS_VERSION, | |
26 | .init = fio_cpuio_init, | |
ea2877a4 | 27 | .setup = fio_cpuio_setup, |
2866c82d JA |
28 | .flags = FIO_CPUIO, |
29 | }; |