summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorRichard Wareing <rwareing@fb.com>2014-02-12 18:37:55 -0800
committerJeff Darcy <jdarcy@redhat.com>2015-10-08 05:44:27 -0700
commit722ed512220395af8a707756b49df67afacda795 (patch)
treeae2e4cf59a5b7fb33ecb506eb823bb049b520a05 /libglusterfs
parentebe40c5047e7501a5bd1747cb4d62277ae0db6e9 (diff)
xlators: add JSON FOP statistics dumps every N seconds
Summary: - Adds a thread to the io-stats translator which dumps out statistics every N seconds where N is configurable by an option called "diagnostics.stats-dump-interval" - Thread cleanly starts/stops when translator is unloaded - Updates macros to use "Atomic Builtins" (e.g. intel CPU extentions) to use memory barries to update counters vs using locks. This should reduce overhead and prevent any deadlock bugs due to lock contention. Test Plan: - Test on development machine - Run prove -v tests/basic/stats-dump.t Change-Id: If071239d8fdc185e4e8fd527363cc042447a245d BUG: 1266476 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/12209 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/xlator.c1
-rw-r--r--libglusterfs/src/xlator.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 30775354253..ed120d23a8f 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -409,6 +409,7 @@ xlator_init (xlator_t *xl)
if (xl->mem_acct_init)
xl->mem_acct_init (xl);
+ xl->instance_name = NULL;
if (!xl->init) {
gf_msg (xl->name, GF_LOG_WARNING, 0, LG_MSG_INIT_FAILED,
"No init() found");
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index d7dbfb413be..27b598d7e60 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -853,6 +853,7 @@ struct _xlator {
/* Built during parsing */
char *name;
char *type;
+ char *instance_name; /* Used for multi NFSd */
xlator_t *next;
xlator_t *prev;
xlator_list_t *parents;