Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 1 | /* |
Jens Axboe | da751ca | 2007-03-14 10:59:33 +0100 | [diff] [blame^] | 2 | * syslet engine |
| 3 | * |
| 4 | * IO engine that does regular pread(2)/pwrite(2) to transfer data, but |
| 5 | * with syslets to make the execution async. |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 6 | * |
| 7 | */ |
| 8 | #include <stdio.h> |
| 9 | #include <stdlib.h> |
| 10 | #include <unistd.h> |
| 11 | #include <errno.h> |
| 12 | #include <assert.h> |
| 13 | |
| 14 | #include "../fio.h" |
| 15 | #include "../os.h" |
| 16 | |
| 17 | #ifdef FIO_HAVE_SYSLET |
| 18 | |
| 19 | struct syslet_data { |
| 20 | struct io_u **events; |
| 21 | unsigned int nr_events; |
| 22 | |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 23 | struct async_head_user ahu; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 24 | struct syslet_uatom **ring; |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 25 | |
| 26 | struct syslet_uatom *head, *tail; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 27 | }; |
| 28 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 29 | static void fio_syslet_complete_atom(struct thread_data *td, |
| 30 | struct syslet_uatom *atom) |
| 31 | { |
| 32 | struct syslet_data *sd = td->io_ops->data; |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 33 | struct syslet_uatom *last; |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 34 | struct io_u *io_u; |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 35 | |
| 36 | /* |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 37 | * complete from the beginning of the sequence up to (and |
| 38 | * including) this atom |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 39 | */ |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 40 | last = atom; |
| 41 | io_u = atom->private; |
| 42 | atom = io_u->req.head; |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 43 | |
| 44 | /* |
| 45 | * now complete in right order |
| 46 | */ |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 47 | do { |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 48 | long ret; |
| 49 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 50 | io_u = atom->private; |
| 51 | ret = *atom->ret_ptr; |
Jens Axboe | e2e6791 | 2007-03-12 09:43:05 +0100 | [diff] [blame] | 52 | if (ret >= 0) |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 53 | io_u->resid = io_u->xfer_buflen - ret; |
| 54 | else if (ret < 0) |
| 55 | io_u->error = ret; |
| 56 | |
| 57 | assert(sd->nr_events < td->iodepth); |
| 58 | sd->events[sd->nr_events++] = io_u; |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 59 | |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 60 | if (atom == last) |
| 61 | break; |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 62 | |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 63 | atom = atom->next; |
| 64 | } while (1); |
| 65 | |
| 66 | assert(!last->next); |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 67 | } |
| 68 | |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 69 | /* |
| 70 | * Inspect the ring to see if we have completed events |
| 71 | */ |
| 72 | static void fio_syslet_complete(struct thread_data *td) |
| 73 | { |
| 74 | struct syslet_data *sd = td->io_ops->data; |
| 75 | |
| 76 | do { |
| 77 | struct syslet_uatom *atom; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 78 | |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 79 | atom = sd->ring[sd->ahu.user_ring_idx]; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 80 | if (!atom) |
| 81 | break; |
| 82 | |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 83 | sd->ring[sd->ahu.user_ring_idx] = NULL; |
| 84 | if (++sd->ahu.user_ring_idx == td->iodepth) |
| 85 | sd->ahu.user_ring_idx = 0; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 86 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 87 | fio_syslet_complete_atom(td, atom); |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 88 | } while (1); |
| 89 | } |
| 90 | |
| 91 | static int fio_syslet_getevents(struct thread_data *td, int min, |
| 92 | int fio_unused max, |
| 93 | struct timespec fio_unused *t) |
| 94 | { |
| 95 | struct syslet_data *sd = td->io_ops->data; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 96 | long ret; |
| 97 | |
| 98 | do { |
| 99 | fio_syslet_complete(td); |
| 100 | |
| 101 | /* |
| 102 | * do we have enough immediate completions? |
| 103 | */ |
| 104 | if (sd->nr_events >= (unsigned int) min) |
| 105 | break; |
| 106 | |
| 107 | /* |
| 108 | * OK, we need to wait for some events... |
| 109 | */ |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 110 | ret = async_wait(1, sd->ahu.user_ring_idx, &sd->ahu); |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 111 | if (ret < 0) |
Jens Axboe | e49499f | 2007-02-22 11:08:52 +0100 | [diff] [blame] | 112 | return -errno; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 113 | } while (1); |
| 114 | |
| 115 | ret = sd->nr_events; |
| 116 | sd->nr_events = 0; |
| 117 | return ret; |
| 118 | } |
| 119 | |
| 120 | static struct io_u *fio_syslet_event(struct thread_data *td, int event) |
| 121 | { |
| 122 | struct syslet_data *sd = td->io_ops->data; |
| 123 | |
| 124 | return sd->events[event]; |
| 125 | } |
| 126 | |
| 127 | static void init_atom(struct syslet_uatom *atom, int nr, void *arg0, |
Jens Axboe | a2e1b08 | 2007-02-14 08:06:19 +0100 | [diff] [blame] | 128 | void *arg1, void *arg2, void *arg3, void *ret_ptr, |
| 129 | unsigned long flags, void *priv) |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 130 | { |
| 131 | atom->flags = flags; |
| 132 | atom->nr = nr; |
| 133 | atom->ret_ptr = ret_ptr; |
Jens Axboe | a2e1b08 | 2007-02-14 08:06:19 +0100 | [diff] [blame] | 134 | atom->next = NULL; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 135 | atom->arg_ptr[0] = arg0; |
| 136 | atom->arg_ptr[1] = arg1; |
| 137 | atom->arg_ptr[2] = arg2; |
Jens Axboe | a2e1b08 | 2007-02-14 08:06:19 +0100 | [diff] [blame] | 138 | atom->arg_ptr[3] = arg3; |
| 139 | atom->arg_ptr[4] = atom->arg_ptr[5] = NULL; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 140 | atom->private = priv; |
| 141 | } |
| 142 | |
| 143 | /* |
| 144 | * Use seek atom for sync |
| 145 | */ |
| 146 | static void fio_syslet_prep_sync(struct io_u *io_u, struct fio_file *f) |
| 147 | { |
Jens Axboe | a2e1b08 | 2007-02-14 08:06:19 +0100 | [diff] [blame] | 148 | init_atom(&io_u->req.atom, __NR_fsync, &f->fd, NULL, NULL, NULL, |
Jens Axboe | 7d44a74 | 2007-02-14 17:32:08 +0100 | [diff] [blame] | 149 | &io_u->req.ret, 0, io_u); |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | static void fio_syslet_prep_rw(struct io_u *io_u, struct fio_file *f) |
| 153 | { |
| 154 | int nr; |
| 155 | |
| 156 | /* |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 157 | * prepare rw |
| 158 | */ |
| 159 | if (io_u->ddir == DDIR_READ) |
Jens Axboe | a2e1b08 | 2007-02-14 08:06:19 +0100 | [diff] [blame] | 160 | nr = __NR_pread64; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 161 | else |
Jens Axboe | a2e1b08 | 2007-02-14 08:06:19 +0100 | [diff] [blame] | 162 | nr = __NR_pwrite64; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 163 | |
Jens Axboe | a2e1b08 | 2007-02-14 08:06:19 +0100 | [diff] [blame] | 164 | init_atom(&io_u->req.atom, nr, &f->fd, &io_u->xfer_buf, |
Jens Axboe | 7d44a74 | 2007-02-14 17:32:08 +0100 | [diff] [blame] | 165 | &io_u->xfer_buflen, &io_u->offset, &io_u->req.ret, 0, io_u); |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 166 | } |
| 167 | |
| 168 | static int fio_syslet_prep(struct thread_data fio_unused *td, struct io_u *io_u) |
| 169 | { |
| 170 | struct fio_file *f = io_u->file; |
| 171 | |
| 172 | if (io_u->ddir == DDIR_SYNC) |
| 173 | fio_syslet_prep_sync(io_u, f); |
| 174 | else |
| 175 | fio_syslet_prep_rw(io_u, f); |
| 176 | |
| 177 | return 0; |
| 178 | } |
| 179 | |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 180 | static void cachemiss_thread_start(void) |
| 181 | { |
| 182 | while (1) |
Jens Axboe | 7756b0d | 2007-02-26 10:22:31 +0100 | [diff] [blame] | 183 | async_thread(NULL, NULL); |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 184 | } |
| 185 | |
| 186 | #define THREAD_STACK_SIZE (16384) |
| 187 | |
| 188 | static unsigned long thread_stack_alloc() |
| 189 | { |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 190 | return (unsigned long) malloc(THREAD_STACK_SIZE) + THREAD_STACK_SIZE; |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 191 | } |
| 192 | |
Jens Axboe | a0a930e | 2007-02-27 19:47:13 +0100 | [diff] [blame] | 193 | static void fio_syslet_queued(struct thread_data *td, struct syslet_data *sd) |
| 194 | { |
| 195 | struct syslet_uatom *atom; |
| 196 | struct timeval now; |
| 197 | |
| 198 | fio_gettime(&now, NULL); |
| 199 | |
| 200 | atom = sd->head; |
| 201 | while (atom) { |
| 202 | struct io_u *io_u = atom->private; |
| 203 | |
| 204 | memcpy(&io_u->issue_time, &now, sizeof(now)); |
| 205 | io_u_queued(td, io_u); |
| 206 | atom = atom->next; |
| 207 | } |
| 208 | } |
| 209 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 210 | static int fio_syslet_commit(struct thread_data *td) |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 211 | { |
| 212 | struct syslet_data *sd = td->io_ops->data; |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 213 | struct syslet_uatom *done; |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 214 | |
| 215 | if (!sd->head) |
| 216 | return 0; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 217 | |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 218 | assert(!sd->tail->next); |
| 219 | |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 220 | if (!sd->ahu.new_thread_stack) |
| 221 | sd->ahu.new_thread_stack = thread_stack_alloc(); |
| 222 | |
Jens Axboe | a0a930e | 2007-02-27 19:47:13 +0100 | [diff] [blame] | 223 | fio_syslet_queued(td, sd); |
| 224 | |
Jens Axboe | 7d44a74 | 2007-02-14 17:32:08 +0100 | [diff] [blame] | 225 | /* |
| 226 | * On sync completion, the atom is returned. So on NULL return |
| 227 | * it's queued asynchronously. |
| 228 | */ |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 229 | done = async_exec(sd->head, &sd->ahu); |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 230 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 231 | sd->head = sd->tail = NULL; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 232 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 233 | if (done) |
| 234 | fio_syslet_complete_atom(td, done); |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 235 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 236 | return 0; |
| 237 | } |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 238 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 239 | static int fio_syslet_queue(struct thread_data *td, struct io_u *io_u) |
| 240 | { |
| 241 | struct syslet_data *sd = td->io_ops->data; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 242 | |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 243 | if (sd->tail) { |
| 244 | sd->tail->next = &io_u->req.atom; |
| 245 | sd->tail = &io_u->req.atom; |
| 246 | } else |
| 247 | sd->head = sd->tail = &io_u->req.atom; |
| 248 | |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 249 | io_u->req.head = sd->head; |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 250 | return FIO_Q_QUEUED; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 251 | } |
| 252 | |
Jens Axboe | db64e9b | 2007-02-14 02:10:59 +0100 | [diff] [blame] | 253 | static int async_head_init(struct syslet_data *sd, unsigned int depth) |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 254 | { |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 255 | unsigned long ring_size; |
| 256 | |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 257 | memset(&sd->ahu, 0, sizeof(struct async_head_user)); |
Jens Axboe | 2ca50be | 2007-02-14 08:31:15 +0100 | [diff] [blame] | 258 | |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 259 | ring_size = sizeof(struct syslet_uatom *) * depth; |
| 260 | sd->ring = malloc(ring_size); |
| 261 | memset(sd->ring, 0, ring_size); |
| 262 | |
Ingo Molnar | bf0dc8f | 2007-02-21 23:25:44 +0100 | [diff] [blame] | 263 | sd->ahu.user_ring_idx = 0; |
| 264 | sd->ahu.completion_ring = sd->ring; |
| 265 | sd->ahu.ring_size_bytes = ring_size; |
| 266 | sd->ahu.head_stack = thread_stack_alloc(); |
Jens Axboe | 5b38ee8 | 2007-02-26 10:44:22 +0100 | [diff] [blame] | 267 | sd->ahu.head_eip = (unsigned long) cachemiss_thread_start; |
| 268 | sd->ahu.new_thread_eip = (unsigned long) cachemiss_thread_start; |
Jens Axboe | db64e9b | 2007-02-14 02:10:59 +0100 | [diff] [blame] | 269 | |
| 270 | return 0; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 271 | } |
| 272 | |
Jens Axboe | 2ca50be | 2007-02-14 08:31:15 +0100 | [diff] [blame] | 273 | static void async_head_exit(struct syslet_data *sd) |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 274 | { |
Jens Axboe | 7f059a7 | 2007-02-14 08:53:11 +0100 | [diff] [blame] | 275 | free(sd->ring); |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 276 | } |
| 277 | |
| 278 | static void fio_syslet_cleanup(struct thread_data *td) |
| 279 | { |
| 280 | struct syslet_data *sd = td->io_ops->data; |
| 281 | |
| 282 | if (sd) { |
Jens Axboe | 2ca50be | 2007-02-14 08:31:15 +0100 | [diff] [blame] | 283 | async_head_exit(sd); |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 284 | free(sd->events); |
| 285 | free(sd); |
| 286 | td->io_ops->data = NULL; |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | static int fio_syslet_init(struct thread_data *td) |
| 291 | { |
| 292 | struct syslet_data *sd; |
| 293 | |
Jens Axboe | db64e9b | 2007-02-14 02:10:59 +0100 | [diff] [blame] | 294 | |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 295 | sd = malloc(sizeof(*sd)); |
| 296 | memset(sd, 0, sizeof(*sd)); |
| 297 | sd->events = malloc(sizeof(struct io_u *) * td->iodepth); |
| 298 | memset(sd->events, 0, sizeof(struct io_u *) * td->iodepth); |
Jens Axboe | db64e9b | 2007-02-14 02:10:59 +0100 | [diff] [blame] | 299 | |
| 300 | /* |
| 301 | * This will handily fail for kernels where syslet isn't available |
| 302 | */ |
| 303 | if (async_head_init(sd, td->iodepth)) { |
| 304 | free(sd->events); |
| 305 | free(sd); |
| 306 | return 1; |
| 307 | } |
| 308 | |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 309 | td->io_ops->data = sd; |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 310 | return 0; |
| 311 | } |
| 312 | |
| 313 | static struct ioengine_ops ioengine = { |
| 314 | .name = "syslet-rw", |
| 315 | .version = FIO_IOOPS_VERSION, |
| 316 | .init = fio_syslet_init, |
| 317 | .prep = fio_syslet_prep, |
| 318 | .queue = fio_syslet_queue, |
Jens Axboe | 9ff9de6 | 2007-02-23 13:21:45 +0100 | [diff] [blame] | 319 | .commit = fio_syslet_commit, |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 320 | .getevents = fio_syslet_getevents, |
| 321 | .event = fio_syslet_event, |
| 322 | .cleanup = fio_syslet_cleanup, |
Jens Axboe | b5af829 | 2007-03-08 12:43:13 +0100 | [diff] [blame] | 323 | .open_file = generic_open_file, |
| 324 | .close_file = generic_close_file, |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 325 | }; |
| 326 | |
| 327 | #else /* FIO_HAVE_SYSLET */ |
| 328 | |
| 329 | /* |
| 330 | * When we have a proper configure system in place, we simply wont build |
| 331 | * and install this io engine. For now install a crippled version that |
| 332 | * just complains and fails to load. |
| 333 | */ |
| 334 | static int fio_syslet_init(struct thread_data fio_unused *td) |
| 335 | { |
| 336 | fprintf(stderr, "fio: syslet not available\n"); |
| 337 | return 1; |
| 338 | } |
| 339 | |
| 340 | static struct ioengine_ops ioengine = { |
| 341 | .name = "syslet-rw", |
| 342 | .version = FIO_IOOPS_VERSION, |
| 343 | .init = fio_syslet_init, |
| 344 | }; |
| 345 | |
| 346 | #endif /* FIO_HAVE_SYSLET */ |
| 347 | |
| 348 | static void fio_init fio_syslet_register(void) |
| 349 | { |
| 350 | register_ioengine(&ioengine); |
| 351 | } |
| 352 | |
| 353 | static void fio_exit fio_syslet_unregister(void) |
| 354 | { |
| 355 | unregister_ioengine(&ioengine); |
| 356 | } |