From 80a24ba9290c53d8d762cde1ec13efa9242dceae Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 19 May 2016 11:24:30 -0600 Subject: [PATCH] iolog: don't quiesce on completion We can infinitely recurse if we do that, if log_compression= is set. Signed-off-by: Jens Axboe --- iolog.c | 2 -- stat.c | 17 ++++------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/iolog.c b/iolog.c index abc2dc3e..0b775de1 100644 --- a/iolog.c +++ b/iolog.c @@ -1202,8 +1202,6 @@ int iolog_cur_flush(struct io_log *log, struct io_logs *cur_log) { struct iolog_flush_data *data; - io_u_quiesce(log->td); - data = malloc(sizeof(*data)); if (!data) return 1; diff --git a/stat.c b/stat.c index b42e886c..5eb1aab1 100644 --- a/stat.c +++ b/stat.c @@ -1870,15 +1870,7 @@ static struct io_logs *get_new_log(struct io_log *iolog) new_samples = MAX_LOG_ENTRIES; } - /* - * If the alloc size is sufficiently large, quiesce pending IO before - * attempting it. This is to avoid spending a long time in alloc with - * IO pending, which will unfairly skew the completion latencies of - * inflight IO. - */ new_size = new_samples * log_entry_sz(iolog); - if (new_size >= LOG_QUIESCE_SZ) - io_u_quiesce(iolog->td); cur_log = malloc(sizeof(*cur_log)); if (cur_log) { @@ -1926,12 +1918,11 @@ static struct io_logs *get_cur_log(struct io_log *iolog) * Get a new log array, and add to our list */ cur_log = get_new_log(iolog); - if (!cur_log) { - log_err("fio: failed extending iolog! Will stop logging.\n"); - return NULL; - } + if (cur_log) + return cur_log; - return cur_log; + log_err("fio: failed extending iolog! Will stop logging.\n"); + return NULL; } static void __add_log_sample(struct io_log *iolog, unsigned long val, -- 2.25.1