Home | History | Annotate | Download | only in fio

Lines Matching refs:td

79 static void reset_io_counters(struct thread_data *td)
84 td->stat_io_bytes[ddir] = 0;
85 td->this_io_bytes[ddir] = 0;
86 td->stat_io_blocks[ddir] = 0;
87 td->this_io_blocks[ddir] = 0;
88 td->rate_bytes[ddir] = 0;
89 td->rate_blocks[ddir] = 0;
91 td->zone_bytes = 0;
93 td->last_was_sync = 0;
94 td->rwmix_issues = 0;
99 if (td->o.time_based || td->o.loops || td->o.do_verify)
100 td->nr_done_files = 0;
103 void clear_io_state(struct thread_data *td)
108 reset_io_counters(td);
110 close_files(td);
111 for_each_file(td, f, i)
117 td_fill_rand_seeds(td);
120 void reset_all_stats(struct thread_data *td)
125 reset_io_counters(td);
128 td->io_bytes[i] = 0;
129 td->io_blocks[i] = 0;
130 td->io_issues[i] = 0;
131 td->ts.total_io_u[i] = 0;
132 td->ts.runtime[i] = 0;
133 td->rwmix_issues = 0;
137 memcpy(&td->epoch, &tv, sizeof(tv));
138 memcpy(&td->start, &tv, sizeof(tv));
140 lat_target_reset(td);
167 void td_set_runstate(struct thread_data *td, int runstate)
169 if (td->runstate == runstate)
172 dprint(FD_PROCESS, "pid=%d: runstate %d -> %d\n", (int) td->pid,
173 td->runstate, runstate);
174 td->runstate = runstate;
177 int td_bump_runstate(struct thread_data *td, int new_state)
179 int old_state = td->runstate;
181 td_set_runstate(td, new_state);
185 void td_restore_runstate(struct thread_data *td, int old_state)
187 td_set_runstate(td, old_state);
192 struct thread_data *td;
198 for_each_td(td, i) {
199 if (group_id == TERMINATE_ALL || groupid == td->groupid) {
201 td->o.name, (int) td->pid);
202 td->terminate = 1;
203 td->o.start_delay = 0;
208 if (!td->pid || pid == td->pid)
210 else if (td->runstate < TD_RAMP)
211 kill(td->pid, SIGTERM);
213 struct ioengine_ops *ops = td->io_ops;
216 ops->terminate(td);
224 struct thread_data *td;
227 for_each_td(td, i) {
228 if (td->flags & TD_F_NOIO)
230 if (td->runstate < TD_EXITED)