X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=backend.c;h=6d503606b10ebe7145c449b1d8c14390a4f99549;hp=efedb5329d65a9bc224047ffe43027ca21f290f1;hb=ecfd2bb08cc87bc9a1b3d612258f1fdfb4d09698;hpb=2c45a4acc6a5e335b9dcf4d6722d4cbbf92d9f6c diff --git a/backend.c b/backend.c index efedb532..6d503606 100644 --- a/backend.c +++ b/backend.c @@ -441,6 +441,12 @@ static int wait_for_completions(struct thread_data *td, struct timeval *time) int min_evts = 0; int ret; + if (td->flags & TD_F_REGROW_LOGS) { + ret = io_u_quiesce(td); + regrow_logs(td); + return ret; + } + /* * if the queue is full, we MUST reap at least 1 event */ @@ -1471,6 +1477,14 @@ static void *thread_main(void *data) goto err; } + /* + * Do this early, we don't want the compress threads to be limited + * to the same CPUs as the IO workers. So do this before we set + * any potential CPU affinity + */ + if (iolog_compress_init(td, sk_out)) + goto err; + /* * If we have a gettimeofday() thread, make sure we exclude that * thread from this job @@ -1605,9 +1619,6 @@ static void *thread_main(void *data) goto err; } - if (iolog_compress_init(td, sk_out)) - goto err; - fio_verify_init(td); if (rate_submit_init(td, sk_out)) @@ -1705,6 +1716,8 @@ static void *thread_main(void *data) break; } + td_set_runstate(td, TD_FINISHING); + update_rusage_stat(td); td->ts.total_run_time = mtime_since_now(&td->epoch); td->ts.io_bytes[DDIR_READ] = td->io_bytes[DDIR_READ]; @@ -1813,8 +1826,9 @@ static int fork_main(struct sk_out *sk_out, int shmid, int offset) static void dump_td_info(struct thread_data *td) { - log_err("fio: job '%s' hasn't exited in %lu seconds, it appears to " - "be stuck. Doing forceful exit of this job.\n", td->o.name, + log_err("fio: job '%s' (state=%d) hasn't exited in %lu seconds, it " + "appears to be stuck. Doing forceful exit of this job.\n", + td->o.name, td->runstate, (unsigned long) time_since_now(&td->terminate_time)); }