Recent changes (master)
The following changes since commit 6fa3ad511a61666b492ed8126330db9f876359bc:
iolog: fix duplicate handling of compression end (2016-05-19 15:49:57 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 2ab71dc4d39e29764f0f80a3559a0119247e1eb1:
iolog: fix potential oops in iolog disabling (2016-05-20 14:36:34 -0600)
----------------------------------------------------------------
David Zeng (1):
The fixed CPU architecture in the Makefile will make failure on ppc64le.
Jens Axboe (5):
iolog: regrow log out-of-line
iolog: remove dead define
Merge branch 'master' of https://github.com/davidzengxhsh/fio
iolog: fix two bugs in deferred growing
iolog: fix potential oops in iolog disabling
Makefile | 2 +- backend.c | 6 ++++++ fio.h | 1 + iolog.c | 16 +++++++++++++++ iolog.h | 9 ++++++-- stat.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 6 files changed, 98 insertions(+), 6 deletions(-)
---
Diff of recent changes:
Makefile +1 -1
@@ -49,7 +49,7 @@ SOURCE := $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \ ifdef CONFIG_LIBHDFS HDFSFLAGS= -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux -I $(FIO_LIBHDFS_INCLUDE) - HDFSLIB= -Wl,-rpath $(JAVA_HOME)/jre/lib/amd64/server -L$(JAVA_HOME)/jre/lib/amd64/server -ljvm $(FIO_LIBHDFS_LIB)/libhdfs.a + HDFSLIB= -Wl,-rpath $(JAVA_HOME)/jre/lib/`uname -m`/server -L$(JAVA_HOME)/jre/lib/`uname -m`/server -ljvm $(FIO_LIBHDFS_LIB)/libhdfs.a CFLAGS += $(HDFSFLAGS) SOURCE += engines/libhdfs.c endif
backend.c +6 -0
@@ -441,6 +441,12 @@ static int wait_for_completions(struct thread_data *td, struct timeval *time)int min_evts =0 ;int ret; +if (td->flags &TD_F_REGROW_LOGS ) { + ret =io_u_quiesce (td); +regrow_logs (td); +return ret; + } +/* * if the queue is full, we MUST reap at least 1 event */
fio.h +1 -0
@@ -79,6 +79,7 @@ enum {TD_F_NEED_LOCK =1U <<11 ,TD_F_CHILD =1U <<12 ,TD_F_NO_PROGRESS =1U <<13 , + TD_F_REGROW_LOGS = 1U << 14, }; enum {
iolog.c +16 -0
@@ -587,6 +587,15 @@ void setup_log(struct io_log **log, struct log_params *p, l->filename =strdup (filename); l->td = p->td; +if (l->td && l->td->o.io_submit_mode !=IO_MODE_OFFLOAD ) { +struct io_logs *p; + + p =calloc (1 ,sizeof (*l->pending)); + p->max_samples =DEF_LOG_ENTRIES ; + p->log =calloc (p->max_samples,log_entry_sz (l)); + l->pending = p; + } +if (l->log_offset) l->log_ddir_mask =LOG_OFFSET_SAMPLE_BIT ;
@@ -638,6 +647,13 @@ void free_log(struct io_log *log)free (cur_log->log); } +if (log->pending) { +free (log->pending->log); +free (log->pending); + log->pending =NULL ; + } + +free (log->pending);free (log->filename);sfree (log); }
iolog.h +7 -2
@@ -44,8 +44,6 @@ enum {#define DEF_LOG_ENTRIES 1024#define MAX_LOG_ENTRIES (1024 * DEF_LOG_ENTRIES) -#define LOG_QUIESCE_SZ (64 * 1024 * 1024) -struct io_logs {struct flist_head list;uint64_t nr_samples;
@@ -63,6 +61,12 @@ struct io_log {struct flist_head io_logs;uint32_t cur_log_max; +/* +* When the current log runs out of space, store events here until +* we have a chance to regrow +*/ +struct io_logs *pending; +unsigned int log_ddir_mask;char *filename;
@@ -139,6 +143,7 @@ static inline struct io_sample *__get_sample(void *samples, int log_offset,struct io_logs *iolog_cur_log (struct io_log *);uint64_t iolog_nr_samples (struct io_log *); +void regrow_logs (struct thread_data *); static inline struct io_sample *get_sample(struct io_log *iolog, struct io_logs *cur_log,
stat.c +67 -3
89 lines not on this page · raw message