Home | History | Annotate | Download | only in fio

Lines Matching refs:td

17 	struct thread_data *td = sw->priv;
22 io_u_set(td, io_u, IO_U_F_NO_FILE_PUT);
24 td->cur_depth++;
27 ret = td_io_queue(td, io_u);
30 ret = io_u_queued_complete(td, 1);
32 td->cur_depth -= ret;
33 io_u_clear(td, io_u, IO_U_F_FLIGHT);
38 io_queue_event(td, io_u, &ret, ddir, NULL, 0, NULL);
41 td->cur_depth--;
45 if (td->o.iodepth == 1)
50 ret = io_u_queued_complete(td, min_evts);
52 td->cur_depth -= ret;
54 ret = io_u_queued_complete(td, td->cur_depth);
56 td->cur_depth -= ret;
64 struct thread_data *td = sw->priv;
66 if (td->io_u_queued || td->cur_depth || td->io_u_in_flight)
74 struct thread_data *td = sw->priv;
77 ret = io_u_quiesce(td);
79 td->cur_depth -= ret;
84 struct thread_data *td;
86 td = calloc(1, sizeof(*td));
87 sw->priv = td;
99 struct thread_data *parent = sw->wq->td;
100 struct thread_data *td = sw->priv;
102 memcpy(&td->o, &parent->o, sizeof(td->o));
103 memcpy(&td->ts, &parent->ts, sizeof(td->ts));
104 td->o.uid = td->o.gid = -1U;
105 dup_files(td, parent);
106 td->eo = parent->eo;
107 fio_options_mem_dupe(td);
109 if (ioengine_load(td))
112 td->pid = gettid();
114 INIT_FLIST_HEAD(&td->io_log_list);
115 INIT_FLIST_HEAD(&td->io_hist_list);
116 INIT_FLIST_HEAD(&td->verify_list);
117 INIT_FLIST_HEAD(&td->trim_list);
118 INIT_FLIST_HEAD(&td->next_rand_list);
119 td->io_hist_tree = RB_ROOT;
121 td->o.iodepth = 1;
122 if (td_io_init(td))
125 set_epoch_time(td, td->o.log_unix_epoch);
126 fio_getrusage(&td->ru_start);
127 clear_io_state(td, 1);
129 td_set_runstate(td, TD_RUNNING);
130 td->flags |= TD_F_CHILD;
131 td->parent = parent;
135 close_ioengine(td);
144 struct thread_data *td = sw->priv;
147 sum_thread_stats(&sw->wq->td->ts, &td->ts, *sum_cnt == 1);
149 fio_options_free(td);
150 close_and_free_files(td);
151 if (td->io_ops)
152 close_ioengine(td);
153 td_set_runstate(td, TD_EXITED);
213 struct thread_data *dst = sw->wq->td;
235 int rate_submit_init(struct thread_data *td, struct sk_out *sk_out)
237 if (td->o.io_submit_mode != IO_MODE_OFFLOAD)
240 return workqueue_init(td, &td->io_wq, &rated_wq_ops, td->o.iodepth, sk_out);
243 void rate_submit_exit(struct thread_data *td)
245 if (td->o.io_submit_mode != IO_MODE_OFFLOAD)
248 workqueue_exit(&td->io_wq);