From: Jens Axboe <axboe@kernel.dk>
To: Matthew Eaton <m.eaton82@gmail.com>
Cc: fio@vger.kernel.org
Subject: Re: Increasing startup time
Date: Sat, 7 Nov 2015 17:34:48 -0700 [thread overview]
Message-ID: <20151108003448.GD9335@kernel.dk> (raw)
In-Reply-To: <20151108002911.GB9335@kernel.dk>
On Sat, Nov 07 2015, Jens Axboe wrote:
> On Thu, Nov 05 2015, Matthew Eaton wrote:
> > I noticed during testing recent fio releases it seemed bit laggy to
> > start, so I tried some tests and it seems fio has been increasingly
> > taking longer to start for some reason. Don't know if this is
> > expected or if something is wrong?
>
> Try the below.
Committed, with a fixup to still clear the actual bitmap. Should work
faster for you than even the earlier versions you tested.
commit 9c3e13e3314da394698ca32f21cc46d46b7cfe47
Author: Jens Axboe <axboe@fb.com>
Date: Sat Nov 7 17:33:38 2015 -0700
smalloc: only clear the bitmap, not the whole pool
This reduces startup time, and the memset() isn't useful nor
needed on the full range.
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/smalloc.c b/smalloc.c
index 8412e7518464..5047cda5e343 100644
--- a/smalloc.c
+++ b/smalloc.c
@@ -213,9 +213,9 @@ static int add_pool(struct pool *pool, unsigned int alloc_size)
if (ptr == MAP_FAILED)
goto out_fail;
- memset(ptr, 0, alloc_size);
pool->map = ptr;
pool->bitmap = (void *) ptr + (pool->nr_blocks * SMALLOC_BPL);
+ memset(pool->bitmap, 0, bitmap_blocks * sizeof(unsigned int));
pool->lock = fio_mutex_init(FIO_MUTEX_UNLOCKED);
if (!pool->lock)
--
Jens Axboe
next prev parent reply other threads:[~2015-11-08 0:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 3:08 Increasing startup time Matthew Eaton
2015-11-08 0:29 ` Jens Axboe
2015-11-08 0:34 ` Jens Axboe [this message]
2015-11-09 17:33 ` Matthew Eaton
2015-11-09 17:40 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151108003448.GD9335@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=m.eaton82@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox