X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=backend.c;h=fb2a8551e396227fc01ed5849e95fbd0e15c38a8;hb=52d892b24cbcd887fe30cce96577a067ee171ea0;hp=d98658606d772ed7d31b1355571ee2566b53a213;hpb=4d384589772a50924c68261086feae594020395e;p=fio.git diff --git a/backend.c b/backend.c index d9865860..fb2a8551 100644 --- a/backend.c +++ b/backend.c @@ -1731,9 +1731,13 @@ static void *thread_main(void *data) * the rusage_sem, which would never get upped because * this thread is waiting for the stat mutex. */ - check_update_rusage(td); + do { + check_update_rusage(td); + if (!fio_mutex_down_trylock(stat_mutex)) + break; + usleep(1000); + } while (1); - fio_mutex_down(stat_mutex); if (td_read(td) && td->io_bytes[DDIR_READ]) update_runtime(td, elapsed_us, DDIR_READ); if (td_write(td) && td->io_bytes[DDIR_WRITE])