• Home
  • Raw
  • Download

Lines Matching refs:td

34 static void check_str_update(struct thread_data *td)  in check_str_update()  argument
36 char c = __run_str[td->thread_number - 1]; in check_str_update()
38 switch (td->runstate) { in check_str_update()
40 if (td->error) in check_str_update()
42 else if (td->sig) in check_str_update()
54 if (td_rw(td)) { in check_str_update()
55 if (td_random(td)) { in check_str_update()
56 if (td->o.rwmix[DDIR_READ] == 100) in check_str_update()
58 else if (td->o.rwmix[DDIR_WRITE] == 100) in check_str_update()
63 if (td->o.rwmix[DDIR_READ] == 100) in check_str_update()
65 else if (td->o.rwmix[DDIR_WRITE] == 100) in check_str_update()
70 } else if (td_read(td)) { in check_str_update()
71 if (td_random(td)) in check_str_update()
75 } else if (td_write(td)) { in check_str_update()
76 if (td_random(td)) in check_str_update()
81 if (td_random(td)) in check_str_update()
110 log_err("state %d\n", td->runstate); in check_str_update()
113 __run_str[td->thread_number - 1] = c; in check_str_update()
148 static int thread_eta(struct thread_data *td) in thread_eta() argument
155 elapsed = (mtime_since_now(&td->epoch) + 999) / 1000; in thread_eta()
156 timeout = td->o.timeout / 1000000UL; in thread_eta()
158 bytes_total = td->total_io_size; in thread_eta()
160 if (td->o.fill_device && td->o.size == -1ULL) { in thread_eta()
161 if (!td->fill_device_size || td->fill_device_size == -1ULL) in thread_eta()
164 bytes_total = td->fill_device_size; in thread_eta()
167 if (td->o.zone_size && td->o.zone_skip && bytes_total) { in thread_eta()
171 zone_bytes = bytes_total + td->o.zone_size + td->o.zone_skip; in thread_eta()
172 nr_zones = (zone_bytes - 1) / (td->o.zone_size + td->o.zone_skip); in thread_eta()
173 bytes_total -= nr_zones * td->o.zone_skip; in thread_eta()
181 if (td->o.do_verify && td->o.verify && td_write(td)) { in thread_eta()
182 if (td_rw(td)) { in thread_eta()
185 if (td->o.rwmix[DDIR_WRITE]) in thread_eta()
186 perc = td->o.rwmix[DDIR_WRITE]; in thread_eta()
193 if (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING) { in thread_eta()
196 bytes_done = ddir_rw_sum(td->io_bytes); in thread_eta()
205 if (td->o.time_based) { in thread_eta()
221 if (td->o.timeout && in thread_eta()
224 } else if (td->runstate == TD_NOT_CREATED || td->runstate == TD_CREATED in thread_eta()
225 || td->runstate == TD_INITIALIZED in thread_eta()
226 || td->runstate == TD_SETTING_UP in thread_eta()
227 || td->runstate == TD_RAMP in thread_eta()
228 || td->runstate == TD_PRE_READING) { in thread_eta()
236 if (td->o.timeout) { in thread_eta()
237 uint64_t __timeout = td->o.timeout; in thread_eta()
238 uint64_t start_delay = td->o.start_delay; in thread_eta()
239 uint64_t ramp_time = td->o.ramp_time; in thread_eta()
244 if (in_ramp_time(td)) { in thread_eta()
247 ramp_left = mtime_since_now(&td->epoch); in thread_eta()
253 rate_bytes = ddir_rw_sum(td->o.rate); in thread_eta()
256 r_eta += (td->o.start_delay / 1000000ULL); in thread_eta()
323 struct thread_data *td; in calc_thread_status() local
360 for_each_td(td, i) { in calc_thread_status()
361 unified_rw_rep += td->o.unified_rw_rep; in calc_thread_status()
362 if (is_power_of_2(td->o.kb_base)) in calc_thread_status()
364 je->unit_base = td->o.unit_base; in calc_thread_status()
365 if (td->o.bw_avg_time < bw_avg_time) in calc_thread_status()
366 bw_avg_time = td->o.bw_avg_time; in calc_thread_status()
367 if (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING in calc_thread_status()
368 || td->runstate == TD_FSYNCING in calc_thread_status()
369 || td->runstate == TD_PRE_READING in calc_thread_status()
370 || td->runstate == TD_FINISHING) { in calc_thread_status()
372 if (td_read(td)) { in calc_thread_status()
373 je->t_rate[0] += td->o.rate[DDIR_READ]; in calc_thread_status()
374 je->t_iops[0] += td->o.rate_iops[DDIR_READ]; in calc_thread_status()
375 je->m_rate[0] += td->o.ratemin[DDIR_READ]; in calc_thread_status()
376 je->m_iops[0] += td->o.rate_iops_min[DDIR_READ]; in calc_thread_status()
378 if (td_write(td)) { in calc_thread_status()
379 je->t_rate[1] += td->o.rate[DDIR_WRITE]; in calc_thread_status()
380 je->t_iops[1] += td->o.rate_iops[DDIR_WRITE]; in calc_thread_status()
381 je->m_rate[1] += td->o.ratemin[DDIR_WRITE]; in calc_thread_status()
382 je->m_iops[1] += td->o.rate_iops_min[DDIR_WRITE]; in calc_thread_status()
384 if (td_trim(td)) { in calc_thread_status()
385 je->t_rate[2] += td->o.rate[DDIR_TRIM]; in calc_thread_status()
386 je->t_iops[2] += td->o.rate_iops[DDIR_TRIM]; in calc_thread_status()
387 je->m_rate[2] += td->o.ratemin[DDIR_TRIM]; in calc_thread_status()
388 je->m_iops[2] += td->o.rate_iops_min[DDIR_TRIM]; in calc_thread_status()
391 je->files_open += td->nr_open_files; in calc_thread_status()
392 } else if (td->runstate == TD_RAMP) { in calc_thread_status()
395 } else if (td->runstate == TD_SETTING_UP) in calc_thread_status()
397 else if (td->runstate < TD_RUNNING) in calc_thread_status()
401 eta_secs[i] = thread_eta(td); in calc_thread_status()
405 check_str_update(td); in calc_thread_status()
407 if (td->runstate > TD_SETTING_UP) { in calc_thread_status()
412 io_bytes[0] += td->io_bytes[ddir]; in calc_thread_status()
413 io_iops[0] += td->io_blocks[ddir]; in calc_thread_status()
415 io_bytes[ddir] += td->io_bytes[ddir]; in calc_thread_status()
416 io_iops[ddir] += td->io_blocks[ddir]; in calc_thread_status()
427 for_each_td(td, i) { in calc_thread_status()
442 if (write_bw_log && rate_time > bw_avg_time && !in_ramp_time(td)) { in calc_thread_status()