smalloc: fixup --alloc-size
authorJens Axboe <axboe@fb.com>
Sun, 25 Sep 2016 19:45:59 +0000 (13:45 -0600)
committerJens Axboe <axboe@fb.com>
Sun, 25 Sep 2016 19:45:59 +0000 (13:45 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
README
init.c

diff --git a/README b/README
index 5fa37f3eed33a15a15a38836cf0080edc81688fd..a69a57891bd2f7c72f80fd8f0b781f33cd089a8b 100644 (file)
--- a/README
+++ b/README
@@ -169,7 +169,7 @@ $ fio
        --status-interval=t     Force full status dump every 't' period passed
        --section=name          Only run specified section in job file.
                                Multiple sections can be specified.
        --status-interval=t     Force full status dump every 't' period passed
        --section=name          Only run specified section in job file.
                                Multiple sections can be specified.
-       --alloc-size=kb         Set smalloc pool to this size in kb (def 1024)
+       --alloc-size=kb         Set smalloc pool to this size in kb (def 16384)
        --warnings-fatal        Fio parser warnings are fatal
        --max-jobs              Maximum number of threads/processes to support
        --server=args           Start backend server. See Client/Server section.
        --warnings-fatal        Fio parser warnings are fatal
        --max-jobs              Maximum number of threads/processes to support
        --server=args           Start backend server. See Client/Server section.
@@ -233,7 +233,7 @@ sections.  The reserved 'global' section is always parsed and used.
 The --alloc-size switch allows one to use a larger pool size for smalloc.
 If running large jobs with randommap enabled, fio can run out of memory.
 Smalloc is an internal allocator for shared structures from a fixed size
 The --alloc-size switch allows one to use a larger pool size for smalloc.
 If running large jobs with randommap enabled, fio can run out of memory.
 Smalloc is an internal allocator for shared structures from a fixed size
-memory pool. The pool size defaults to 1024k and can grow to 128 pools.
+memory pool. The pool size defaults to 16M and can grow to 8 pools.
 
 NOTE: While running .fio_smalloc.* backing store files are visible in /tmp.
 
 
 NOTE: While running .fio_smalloc.* backing store files are visible in /tmp.
 
diff --git a/init.c b/init.c
index 6b6e386e398a04b4d8e27c7a034e6cd66e58025c..5482c665c277e5050b89a5759fa9bcd49895fd26 100644 (file)
--- a/init.c
+++ b/init.c
@@ -2308,6 +2308,7 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
                switch (c) {
                case 'a':
                        smalloc_pool_size = atoi(optarg);
                switch (c) {
                case 'a':
                        smalloc_pool_size = atoi(optarg);
+                       smalloc_pool_size <<= 10;
                        break;
                case 't':
                        if (check_str_time(optarg, &def_timeout, 1)) {
                        break;
                case 't':
                        if (check_str_time(optarg, &def_timeout, 1)) {