From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org,
Konstantin Osipov <kostja@tarantool.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Subject: Re: [tarantool-patches] Re: [PATCH v2 2/1] tuple: introduce bigref hints
Date: Fri, 8 Jun 2018 13:36:40 +0300 [thread overview]
Message-ID: <90b9229b-ea58-e583-40d5-1969783bd265@tarantool.org> (raw)
In-Reply-To: <20180608032823.GD6866@chai>
On 08/06/2018 06:28, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [18/06/05 00:01]:
>> tuple: introduce bigref hints
>> Typical usage of bigrefs: allocate many bigrefs in Lua in a row,
>> reach memory threshold and delete many bigrefs in a row.
>> Hits allow to make multiple refs deletions or creations be
>> faster. For example, before the patch complexity of N refs with
>> C capacity in a row: O(C) * N.
>> After the patch: O(C) + N.
>> Same about unrefs.
>> Follow up #3224
>
> Why not chain up all free links into a free list, similarly to
> what we do in the slab allocator?
>
>
True list of uint16 has to big overhead on next/prev pointer.
If we use array instead of list, then we face with the same problem
as original bigref array has. Removal from the array produces gaps.
I have decided that the pair of simple hints is enough since the
typical bigref usage follows the scenario: create many bigrefs in Lua in
a row, that triggers lua GC, that frees many bigrefs in a row. My
hints graceful deal with it.
prev parent reply other threads:[~2018-06-08 10:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 15:41 [tarantool-patches] [PATCH v2 1/1] box: create bigrefs for tuples imeevma
2018-06-01 19:11 ` [tarantool-patches] " Konstantin Osipov
2018-06-04 11:21 ` Vladislav Shpilevoy
2018-06-04 14:21 ` Imeev Mergen
2018-06-04 20:57 ` Vladislav Shpilevoy
2018-06-04 21:20 ` Vladislav Shpilevoy
2018-06-08 3:27 ` Konstantin Osipov
2018-06-08 3:18 ` Konstantin Osipov
2018-06-08 3:26 ` Konstantin Osipov
2018-06-04 20:57 ` [tarantool-patches] [PATCH v2 2/1] tuple: introduce bigref hints Vladislav Shpilevoy
2018-06-08 3:28 ` Konstantin Osipov
2018-06-08 10:36 ` Vladislav Shpilevoy [this message]
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=90b9229b-ea58-e583-40d5-1969783bd265@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] Re: [PATCH v2 2/1] tuple: introduce bigref hints' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox