Re: [squid-dev] [PATCH] remove USE_CHUNKEDMEMPOOLS

2017-01-12 Thread Amos Jeffries
On 12/01/2017 8:53 a.m., Kinkie wrote:
> Please go ahead when it's convenient for you.
> 

Applied as v5 rev.15008.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] remove USE_CHUNKEDMEMPOOLS

2017-01-11 Thread Kinkie
Please go ahead when it's convenient for you.

On Wed, Jan 11, 2017 at 4:00 PM, Amos Jeffries  wrote:
> On 12/01/2017 4:46 a.m., Alex Rousskov wrote:
>> On 01/11/2017 08:29 AM, Amos Jeffries wrote:
>>> On 1/01/2017 6:37 p.m., Amos Jeffries wrote:
 The USE_CHUNKEDMEMPOOLS build-time setting is not very useful and adds
 extra complexity to the build system. Even when set it does not always
 enable chunked pools. The environment variable MEMPOOLS can easily be
 used to enable or disable chunked pools as needed.

>>>
>>> If there are no objections I would like to commit this shortly.
>>
>> None from me, but I did not study the patch closely. FWIW, adjusting the
>> commit message to explicitly say whether this change alters any
>> defaults, may help those assessing the change impact on their setups.
>>
>>
>> Thank you,
>>
>> Alex.
>>
>
> It does not change any defaults or behaviour for the vast majority of
> Squid installs. But anyone who was building custom with
> CXXFLAGS="-DUSE_CHUNKEDMEMPOOLS=1" will now have to use the run-time
> environment variable.
>
> Amos
>
> ___
> squid-dev mailing list
> squid-dev@lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-dev



-- 
Francesco
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] remove USE_CHUNKEDMEMPOOLS

2017-01-11 Thread Amos Jeffries
On 12/01/2017 4:46 a.m., Alex Rousskov wrote:
> On 01/11/2017 08:29 AM, Amos Jeffries wrote:
>> On 1/01/2017 6:37 p.m., Amos Jeffries wrote:
>>> The USE_CHUNKEDMEMPOOLS build-time setting is not very useful and adds
>>> extra complexity to the build system. Even when set it does not always
>>> enable chunked pools. The environment variable MEMPOOLS can easily be
>>> used to enable or disable chunked pools as needed.
>>>
>>
>> If there are no objections I would like to commit this shortly.
> 
> None from me, but I did not study the patch closely. FWIW, adjusting the
> commit message to explicitly say whether this change alters any
> defaults, may help those assessing the change impact on their setups.
> 
> 
> Thank you,
> 
> Alex.
> 

It does not change any defaults or behaviour for the vast majority of
Squid installs. But anyone who was building custom with
CXXFLAGS="-DUSE_CHUNKEDMEMPOOLS=1" will now have to use the run-time
environment variable.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] remove USE_CHUNKEDMEMPOOLS

2017-01-11 Thread Alex Rousskov
On 01/11/2017 08:29 AM, Amos Jeffries wrote:
> On 1/01/2017 6:37 p.m., Amos Jeffries wrote:
>> The USE_CHUNKEDMEMPOOLS build-time setting is not very useful and adds
>> extra complexity to the build system. Even when set it does not always
>> enable chunked pools. The environment variable MEMPOOLS can easily be
>> used to enable or disable chunked pools as needed.
>>
> 
> If there are no objections I would like to commit this shortly.

None from me, but I did not study the patch closely. FWIW, adjusting the
commit message to explicitly say whether this change alters any
defaults, may help those assessing the change impact on their setups.


Thank you,

Alex.

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] remove USE_CHUNKEDMEMPOOLS

2017-01-11 Thread Amos Jeffries
On 1/01/2017 6:37 p.m., Amos Jeffries wrote:
> The USE_CHUNKEDMEMPOOLS build-time setting is not very useful and adds
> extra complexity to the build system. Even when set it does not always
> enable chunked pools. The environment variable MEMPOOLS can easily be
> used to enable or disable chunked pools as needed.
> 

If there are no objections I would like to commit this shortly.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


[squid-dev] [PATCH] remove USE_CHUNKEDMEMPOOLS

2016-12-31 Thread Amos Jeffries
The USE_CHUNKEDMEMPOOLS build-time setting is not very useful and adds 
extra complexity to the build system. Even when set it does not always 
enable chunked pools. The environment variable MEMPOOLS can easily be 
used to enable or disable chunked pools as needed.


Amos
=== modified file 'configure.ac'
--- configure.ac	2017-01-01 00:12:22 +
+++ configure.ac	2017-01-01 05:18:54 +
@@ -2630,20 +2630,6 @@
   [Valgrind memory debugger support])
 AC_MSG_NOTICE([Valgrind debug support enabled: $with_valgrind_debug])
 
-dnl Disable "memPools" code
-#AC_ARG_ENABLE(chunkedmempools,
-#  AS_HELP_STRING([--enable-chunkedmempools],
-# [Enable experimental chunked memPools. Note that this option
-# simply sets the default behaviour. Specific classes can override this 
-#  at runtime, and only lib/MemPool.c needs to be altered 
-#  to change the squid-wide default for all classes.]), [ 
-#SQUID_YESNO([$enableval],
-#[--enable-chunkedmempools option takes no arguments])
-#])
-SQUID_DEFINE_BOOL(USE_CHUNKEDMEMPOOLS,${enable_chunkedmempools:=no},
-   [Enable chunked Memory Pools support (experimental)])
-#AC_MSG_NOTICE([Chunked MemPools enabled: $enable_chunkedmempools])
-
 dnl Enable WIN32 Service compile mode
 AC_ARG_ENABLE(win32-service,
   AS_HELP_STRING([--enable-win32-service],

=== modified file 'src/mem/Pool.cc'
--- src/mem/Pool.cc	2017-01-01 00:12:22 +
+++ src/mem/Pool.cc	2017-01-01 05:18:54 +
@@ -77,15 +77,13 @@
 return mem_idle_limit;
 }
 
-/* Change the default calue of defaultIsChunked to override
+/* Change the default value of defaultIsChunked to override
  * all pools - including those used before main() starts where
  * MemPools::GetInstance().setDefaultPoolChunking() can be called.
  */
-MemPools::MemPools() : pools(NULL), mem_idle_limit(2 << 20 /* 2 MB */),
-poolCount(0), defaultIsChunked(USE_CHUNKEDMEMPOOLS && !RUNNING_ON_VALGRIND)
+MemPools::MemPools()
 {
-char *cfg = getenv("MEMPOOLS");
-if (cfg)
+if (char *cfg = getenv("MEMPOOLS"))
 defaultIsChunked = atoi(cfg);
 }
 

=== modified file 'src/mem/Pool.h'
--- src/mem/Pool.h	2017-01-01 00:12:22 +
+++ src/mem/Pool.h	2017-01-01 05:18:54 +
@@ -29,7 +29,6 @@
  */
 
 #include "mem/Meter.h"
-#include "splay.h"
 #include "util.h"
 
 #if HAVE_GNUMALLOC_H
@@ -165,10 +164,11 @@
 void clean(time_t maxage);
 
 void setDefaultPoolChunking(bool const &);
-MemImplementingAllocator *pools;
-ssize_t mem_idle_limit;
-int poolCount;
-bool defaultIsChunked;
+
+MemImplementingAllocator *pools = nullptr;
+ssize_t mem_idle_limit = (2 << 20) /* 2MB */;
+int poolCount = 0;
+bool defaultIsChunked = false;
 };
 
 /**

=== modified file 'src/mem/PoolChunked.h'
--- src/mem/PoolChunked.h	2017-01-01 00:12:22 +
+++ src/mem/PoolChunked.h	2017-01-01 05:18:54 +
@@ -10,6 +10,7 @@
 #define _MEM_POOL_CHUNKED_H_
 
 #include "mem/Pool.h"
+#include "splay.h"
 
 #define MEM_CHUNK_SIZE4 * 4096  /* 16KB ... 4 * VM_PAGE_SZ */
 #define MEM_CHUNK_MAX_SIZE  256 * 1024  /* 2MB */

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev