[PATCH 1/2] iolog: regrow logs in iolog_delay()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The commit b85c01f7e9df ("iolog.c: fix inaccurate clat when replay
trace") triggered the assertion failure below for the workload which
does I/O replay as asynchronous I/O together with log recording options
such as write_lat_log.

  fio: stat.c:3030: get_cur_log: Assertion `iolog->pending->nr_samples < iolog->pending->max_samples' failed.
  fio: pid=40120, got signal=6

The assertion means that too many logs are recorded in the pending log
space which keeps the logs until next log space regrow by reglow_logs()
call. However, reglow_logs() is not called, and the pending log space
runs out.

The trigger commit modified iolog_delay() to call io_u_queued_complete()
so that the asynchronous I/Os can be completed during delays between
replayed I/Os. Before this commit, replayed I/Os were not completed
until all I/O units are consumed. So the free I/O unit list gets empty
periodically, then wait_for_completion() and regrow_logs() were called
periodically. After this commit, all I/O units are not consumed, so
wait_for_completion() and regrow_logs() are no longer called for long
duration. Hence the assertion failure.

To avoid the assertion, add the check for log regrow and reglow_logs()
call in iolog_delay().

Fixes: b85c01f7e9df ("iolog.c: fix inaccurate clat when replay trace")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
---
 iolog.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/iolog.c b/iolog.c
index f52a9a80..251e9d7f 100644
--- a/iolog.c
+++ b/iolog.c
@@ -102,6 +102,8 @@ static void iolog_delay(struct thread_data *td, unsigned long delay)
 		ret = io_u_queued_complete(td, 0);
 		if (ret < 0)
 			td_verror(td, -ret, "io_u_queued_complete");
+		if (td->flags & TD_F_REGROW_LOGS)
+			regrow_logs(td);
 		if (utime_since_now(&ts) > delay)
 			break;
 	}
-- 
2.44.0





[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux