You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/09/10 17:09:41 UTC

[15/48] git commit: TS-2168: Use #if condition to control reclaimable freelist options

TS-2168: Use #if condition to control reclaimable freelist options

1) Define reclaimabe freelist options only when compiles ATS
   with --enable-reclaimabe-freelist,

2) "proxy.config.allocator.enable_reclaim" will be set to 1 by default
   for two reasons:
   a) It should keep consistent with the description in
      records.config.default.in: "Default 1, reclaim enabled",
   b) More important, most users want to get reclaim feature when
      they compiles ATS with --enable-reclaimable-freelist.

3) Make the *NOTE description* in records.config.default.in more notable.

Signed-off-by: Yunkai Zhang <qi...@taobao.com>


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6de8354f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6de8354f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6de8354f

Branch: refs/heads/5.0.x
Commit: 6de8354f20944032fc1ace6559e4bf7bdd1c0186
Parents: 4538389
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Thu Sep 5 15:08:07 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Thu Sep 5 17:26:19 2013 +0800

----------------------------------------------------------------------
 mgmt/RecordsConfig.cc                  |  4 +++-
 proxy/config/records.config.default.in | 12 ++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6de8354f/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 81f0b2d..919675f 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1938,6 +1938,7 @@ RecordElement RecordsConfig[] = {
   {RECT_CONFIG, "proxy.config.stat_api.max_stats_allowed", RECD_INT, "256", RECU_RESTART_TS, RR_NULL, RECC_INT, "[256-1000]", RECA_NULL}
   ,
 
+#if TS_USE_RECLAIMABLE_FREELIST
   //############
   //#
   //# Using for Reclaimable InkFreeList memory pool
@@ -1947,10 +1948,11 @@ RecordElement RecordsConfig[] = {
   ,
   {RECT_CONFIG, "proxy.config.allocator.max_overage", RECD_INT, "3", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.allocator.enable_reclaim", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.allocator.enable_reclaim", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.allocator.reclaim_factor", RECD_FLOAT, "0.3", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
+#endif /* TS_USE_RECLAIMABLE_FREELIST */
 
   //############
   //#

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6de8354f/proxy/config/records.config.default.in
----------------------------------------------------------------------
diff --git a/proxy/config/records.config.default.in b/proxy/config/records.config.default.in
index 549001a..a5abe55 100644
--- a/proxy/config/records.config.default.in
+++ b/proxy/config/records.config.default.in
@@ -606,7 +606,7 @@ CONFIG proxy.config.diags.show_location INT 0
 #
 # Configuration for Reclaimable InkFreeList memory pool
 #
-# NOTE: The following options are not meaningful unless compiles TrafficServer
+# NOTE: The following options are no meaningful unless compiles TrafficServer
 #	with '--enable-reclaimable-freelist' option. Looks like:
 #	$ ./configure --enable-reclaimable-freelist
 #
@@ -615,17 +615,25 @@ CONFIG proxy.config.diags.show_location INT 0
   # in the mask, then debug information of the corresponding action are dumped:
   #  bit 0: reclaim memory in ink_freelist_new
   #  bit 1: allocate memory from partial-free Chunks(if exist) or OS
+  # NOTE: This option make no sense unless compiles TrafficServer
+  #       with '--enable-reclaimable-freelist' option.
 CONFIG proxy.config.allocator.debug_filter INT 0
   # The value of enable_reclaim should be 0 or 1. Default 1, reclaim enabled.
-CONFIG proxy.config.allocator.enable_reclaim INT @use_reclaimable_freelist@
+  # NOTE: This option make no sense unless compiles TrafficServer
+  #       with '--enable-reclaimable-freelist' option.
+CONFIG proxy.config.allocator.enable_reclaim INT 1
   # The value of reclaim_factor should be in 0.0 ~ 1.0, allocator use it to
   # calculate average value of idle memory in InkFreeList, which will determine
   # when to reclaim memory. The larger the value, the faster the reclaiming.
   # This value is effective only when enable_reclaim is 1.
+  # NOTE: This option make no sense unless compiles TrafficServer
+  #       with '--enable-reclaimable-freelist' option.
 CONFIG proxy.config.allocator.reclaim_factor FLOAT 0.300000
   # Allocator will reclaim memory only when it continuously satisfy the reclaim
   # condition for max_overage times. This value is effective only when
   # enable_reclaim is 1.
+  # NOTE: This option make no sense unless compiles TrafficServer
+  #       with '--enable-reclaimable-freelist' option.
 CONFIG proxy.config.allocator.max_overage INT 3
 
 ##############################################################################