diff options
-rw-r--r-- | libglusterfs/src/iobuf.c | 3 | ||||
-rw-r--r-- | libglusterfs/src/iobuf.h | 20 |
2 files changed, 11 insertions, 12 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c index 93bc7732e57..e1cf334ba01 100644 --- a/libglusterfs/src/iobuf.c +++ b/libglusterfs/src/iobuf.c @@ -524,6 +524,7 @@ iobuf_get2 (struct iobuf_pool *iobuf_pool, size_t page_size) gf_log ("iobuf", GF_LOG_ERROR, "page_size (%zu) of " "iobufs in arena being requested is greater than max " "available", page_size); + iobuf_pool->request_misses++; return NULL; } @@ -967,6 +968,8 @@ iobuf_stats_dump (struct iobuf_pool *iobuf_pool) iobuf_pool->arena_size); gf_proc_dump_write("iobuf_pool.arena_cnt", "%d", iobuf_pool->arena_cnt); + gf_proc_dump_write("iobuf_pool.request_misses", "%"PRId64, + iobuf_pool->request_misses); for (j = 0; j < IOBUF_ARENA_MAX_INDEX; j++) { list_for_each_entry (trav, &iobuf_pool->arenas[j], list) { diff --git a/libglusterfs/src/iobuf.h b/libglusterfs/src/iobuf.h index d0f86828615..46a54dbfc95 100644 --- a/libglusterfs/src/iobuf.h +++ b/libglusterfs/src/iobuf.h @@ -113,21 +113,17 @@ struct iobuf_pool { int arena_cnt; struct list_head arenas[GF_VARIABLE_IOBUF_COUNT]; - /* array of arenas. Each element of - the array is a list of arenas - holding iobufs of particular - page_size - */ + /* array of arenas. Each element of the array is a list of arenas + holding iobufs of particular page_size */ + struct list_head filled[GF_VARIABLE_IOBUF_COUNT]; - /* - array of arenas without free iobufs - */ + /* array of arenas without free iobufs */ struct list_head purge[GF_VARIABLE_IOBUF_COUNT]; - /* - array of of arenas which can be - purged - */ + /* array of of arenas which can be purged */ + + uint64_t request_misses; /* mostly the requests for higher + value of iobufs */ }; |