iolog: don't quiesce on completion
authorJens Axboe <axboe@fb.com>
Thu, 19 May 2016 17:24:30 +0000 (11:24 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 19 May 2016 17:24:30 +0000 (11:24 -0600)
We can infinitely recurse if we do that, if log_compression= is set.

Signed-off-by: Jens Axboe <axboe@fb.com>
iolog.c
stat.c

diff --git a/iolog.c b/iolog.c
index abc2dc3ec30f8a450a474930265a47c6c90a442b..0b775de13a21013995158cab0696340cff2db3c2 100644 (file)
--- 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;
 
 {
        struct iolog_flush_data *data;
 
-       io_u_quiesce(log->td);
-
        data = malloc(sizeof(*data));
        if (!data)
                return 1;
        data = malloc(sizeof(*data));
        if (!data)
                return 1;
diff --git a/stat.c b/stat.c
index b42e886c32aeff16aca4ca3892509b192e1aa021..5eb1aab1de246f657e398e6adb4443b262bc6cfa 100644 (file)
--- 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;
        }
 
                        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);
        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) {
 
        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);
         * 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,
 }
 
 static void __add_log_sample(struct io_log *iolog, unsigned long val,