X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=rate-submit.c;h=e5c6204351db00304db32fa376837faa9c420cc9;hb=b8b0e1eea7780a02ff67f0caeba446cc403f1b37;hp=68ad755d948056c0ff9fabc0a26a14961f410a05;hpb=8db390cd9131caec46d252dee39a2a511735283c;p=fio.git diff --git a/rate-submit.c b/rate-submit.c index 68ad755d..e5c62043 100644 --- a/rate-submit.c +++ b/rate-submit.c @@ -21,6 +21,14 @@ static void check_overlap(struct io_u *io_u) * time to prevent two threads from thinking the coast * is clear and then submitting IOs that overlap with * each other + * + * If an overlap is found, release the lock and + * re-acquire it before checking again to give other + * threads a chance to make progress + * + * If an overlap is not found, release the lock when the + * io_u's IO_U_F_FLIGHT flag is set so that this io_u + * can be checked by other threads as they assess overlap */ pthread_mutex_lock(&overlap_check); for_each_td(td, i) {