projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
engines/io_uring_cmd: make trims async
[fio.git]
/
libfio.c
diff --git
a/libfio.c
b/libfio.c
index 1a8917768b86eeabe8ffefa8e0bc9675c51162c3..5e3fd30b718ecc57c3b9e6d5e45202d635a26e0f 100644
(file)
--- a/
libfio.c
+++ b/
libfio.c
@@
-74,6
+74,7
@@
static const char *fio_arch_strings[arch_nr] = {
"hppa",
"mips",
"aarch64",
"hppa",
"mips",
"aarch64",
+ "loongarch64",
"generic"
};
"generic"
};
@@
-94,6
+95,7
@@
static void reset_io_counters(struct thread_data *td, int all)
td->rate_next_io_time[ddir] = 0;
td->last_usec[ddir] = 0;
}
td->rate_next_io_time[ddir] = 0;
td->last_usec[ddir] = 0;
}
+ td->bytes_verified = 0;
}
td->zone_bytes = 0;
}
td->zone_bytes = 0;
@@
-130,10
+132,14
@@
void clear_io_state(struct thread_data *td, int all)
void reset_all_stats(struct thread_data *td)
{
void reset_all_stats(struct thread_data *td)
{
+ unsigned long long b;
int i;
reset_io_counters(td, 1);
int i;
reset_io_counters(td, 1);
+ b = ddir_rw_sum(td->thinktime_blocks_counter);
+ td->last_thinktime_blocks -= b;
+
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
td->io_bytes[i] = 0;
td->io_blocks[i] = 0;
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
td->io_bytes[i] = 0;
td->io_blocks[i] = 0;
@@
-148,6
+154,8
@@
void reset_all_stats(struct thread_data *td)
memcpy(&td->bw_sample_time, &td->epoch, sizeof(td->epoch));
memcpy(&td->ss.prev_time, &td->epoch, sizeof(td->epoch));
memcpy(&td->bw_sample_time, &td->epoch, sizeof(td->epoch));
memcpy(&td->ss.prev_time, &td->epoch, sizeof(td->epoch));
+ td->last_thinktime = td->epoch;
+
lat_target_reset(td);
clear_rusage_stat(td);
helper_reset();
lat_target_reset(td);
clear_rusage_stat(td);
helper_reset();
@@
-239,13
+247,11
@@
void fio_mark_td_terminate(struct thread_data *td)
void fio_terminate_threads(unsigned int group_id, unsigned int terminate)
{
void fio_terminate_threads(unsigned int group_id, unsigned int terminate)
{
- struct thread_data *td;
pid_t pid = getpid();
pid_t pid = getpid();
- int i;
dprint(FD_PROCESS, "terminate group_id=%d\n", group_id);
dprint(FD_PROCESS, "terminate group_id=%d\n", group_id);
- for_each_td(td
, i
) {
+ for_each_td(td) {
if ((terminate == TERMINATE_GROUP && group_id == TERMINATE_ALL) ||
(terminate == TERMINATE_GROUP && group_id == td->groupid) ||
(terminate == TERMINATE_STONEWALL && td->runstate >= TD_RUNNING) ||
if ((terminate == TERMINATE_GROUP && group_id == TERMINATE_ALL) ||
(terminate == TERMINATE_GROUP && group_id == td->groupid) ||
(terminate == TERMINATE_STONEWALL && td->runstate >= TD_RUNNING) ||
@@
-273,22
+279,20
@@
void fio_terminate_threads(unsigned int group_id, unsigned int terminate)
ops->terminate(td);
}
}
ops->terminate(td);
}
}
- }
+ }
end_for_each();
}
int fio_running_or_pending_io_threads(void)
{
}
int fio_running_or_pending_io_threads(void)
{
- struct thread_data *td;
- int i;
int nr_io_threads = 0;
int nr_io_threads = 0;
- for_each_td(td
, i
) {
+ for_each_td(td) {
if (td->io_ops_init && td_ioengine_flagged(td, FIO_NOIO))
continue;
nr_io_threads++;
if (td->runstate < TD_EXITED)
return 1;
if (td->io_ops_init && td_ioengine_flagged(td, FIO_NOIO))
continue;
nr_io_threads++;
if (td->runstate < TD_EXITED)
return 1;
- }
+ }
end_for_each();
if (!nr_io_threads)
return -1; /* we only had cpuio threads to begin with */
if (!nr_io_threads)
return -1; /* we only had cpuio threads to begin with */