smalloc: limit to 1 pool, and bump size to 16MB
authorJens Axboe <axboe@fb.com>
Wed, 14 Jan 2015 04:35:31 +0000 (21:35 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 14 Jan 2015 04:35:31 +0000 (21:35 -0700)
We can easily add new pools, but if we do this after jobs have been
forked off, then it wont really be shared storage as the new mmap
mappings will only apply to the process that instantiated them.
Since we moved the randommap mappings to private storage, we should
not need a lot of room for shared allocations. Hence I hope the 16MB
will suffice.

Signed-off-by: Jens Axboe <axboe@fb.com>
smalloc.c

index 1ba9353518813179fd3e277ae2cbeeec20a43129..67cb7cc11d475b81aef3d53a7eb896eee31504bb 100644 (file)
--- a/smalloc.c
+++ b/smalloc.c
@@ -25,8 +25,8 @@
 #define SMALLOC_BPI    (sizeof(unsigned int) * 8)
 #define SMALLOC_BPL    (SMALLOC_BPB * SMALLOC_BPI)
 
-#define INITIAL_SIZE   8192*1024       /* new pool size */
-#define MAX_POOLS      128             /* maximum number of pools to setup */
+#define INITIAL_SIZE   16*1024*1024    /* new pool size */
+#define MAX_POOLS      1               /* maximum number of pools to setup */
 
 #define SMALLOC_PRE_RED                0xdeadbeefU
 #define SMALLOC_POST_RED       0x5aa55aa5U