From 004f64e93d23f44144483d21422f47e81d358045 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Fri, 24 Apr 2015 10:10:35 +0530 Subject: core: Global timer-wheel Instantiate a process wide global instance of the timer wheel data structure. Spawning glusterfs* process with option arg "--global-timer-wheel" instantiates a global instance of timer-wheel under global context (->ctx). Translators can make use of this process wide instance [via a call to glusterfs_global_timer_wheel()] instead of maintaining an instance of their own and possibly consuming more memory. Linux kernel too has a single instance of timer wheel where subsystems such as IO, networking, etc.. make use of. Bitrot daemon would be early consumers of this: bitrot translator instances for multiple volumes would track objects belonging to their respective bricks in this global expiry tracking data structure. This is also a first step to move GlusterFS timer mechanism to use timer-wheel. Change-Id: Ie882df607e07acaced846ea269ebf1ece306d6ae BUG: 1170075 Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/10380 Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- libglusterfs/src/Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libglusterfs/src/Makefile.am') diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am index cdec56a2b51..c7b85bdf839 100644 --- a/libglusterfs/src/Makefile.am +++ b/libglusterfs/src/Makefile.am @@ -5,7 +5,7 @@ libglusterfs_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \ -DXLATORDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator\" \ -I$(top_srcdir)/rpc/rpc-lib/src/ -I$(CONTRIBDIR)/rbtree \ -I$(CONTRIBDIR)/libexecinfo ${ARGP_STANDALONE_CPPFLAGS} \ - -DSBIN_DIR=\"$(sbindir)\" + -DSBIN_DIR=\"$(sbindir)\" -I$(CONTRIBDIR)/timer-wheel libglusterfs_la_LIBADD = @LEXLIB@ $(ZLIB_LIBS) $(MATH_LIB) $(UUID_LIBS) libglusterfs_la_LDFLAGS = -version-info $(LIBGLUSTERFS_LT_VERSION) @@ -28,7 +28,7 @@ libglusterfs_la_SOURCES = dict.c xlator.c logging.c \ strfd.c parse-utils.c $(CONTRIBDIR)/mount/mntent.c \ $(CONTRIBDIR)/libexecinfo/execinfo.c quota-common-utils.c rot-buffs.c \ $(CONTRIBDIR)/timer-wheel/timer-wheel.c \ - $(CONTRIBDIR)/timer-wheel/find_last_bit.c + $(CONTRIBDIR)/timer-wheel/find_last_bit.c tw.c nodist_libglusterfs_la_SOURCES = y.tab.c graph.lex.c @@ -47,7 +47,8 @@ noinst_HEADERS = common-utils.h defaults.h dict.h glusterfs.h hashfn.h timespec. $(CONTRIBDIR)/mount/mntent_compat.h lvm-defaults.h \ $(CONTRIBDIR)/libexecinfo/execinfo_compat.h \ unittest/unittest.h quota-common-utils.h rot-buffs.h \ - $(CONTRIBDIR)/timer-wheel/timer-wheel.h compat-uuid.h + $(CONTRIBDIR)/timer-wheel/timer-wheel.h compat-uuid.h \ + tw.h if !HAVE_LIBUUID # FIXME: unbundle libuuid, see compat-uuid.h. -- cgit