From 52d892b24cbcd887fe30cce96577a067ee171ea0 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 25 Sep 2016 13:45:59 -0600 Subject: [PATCH] smalloc: fixup --alloc-size Signed-off-by: Jens Axboe --- README | 4 ++-- init.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index 5fa37f3e..a69a5789 100644 --- 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. - --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. @@ -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 -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. diff --git a/init.c b/init.c index 6b6e386e..5482c665 100644 --- 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); + smalloc_pool_size <<= 10; break; case 't': if (check_str_time(optarg, &def_timeout, 1)) { -- 2.25.1