[Tarantool-patches] [PATCH 4/4] fiber: allocate on_stop triggers using mempool

Oleg Babin olegrok at tarantool.org
Thu Aug 26 23:15:09 MSK 2021


On 26.08.2021 23:01, Vladislav Shpilevoy wrote:
> On 26.08.2021 08:14, Oleg Babin via Tarantool-patches wrote:
>> Thanks for your review. See my answers below.
>>
>> On 25.08.2021 23:34, Vladislav Shpilevoy wrote:
>>> Thanks for the patch!
>>>
>>> See 4 comments below.
>>>
>>> On 11.08.2021 22:33, Oleg Babin via Tarantool-patches wrote:
>>>> From: Oleg Babin<babinoleg at mail.ru>
>>>>
>>>> Previously we use malloc for such purpose however we created
>>>> on_stop triggers only if fiber storage was touched. Currently we
>>>> create on_stop trigger for each lua fiber. So it seems reasonable
>>>> to use mempool for such frequent allocations/deallocations.
>>> 1. Does it give any perf win? This commit specifically. Seems like an
>>> overkill. A trigger allocation might happen only once per fiber's
>>> lifetime, and the fiber's creation is supposed to be much longer than
>>> the trigger's malloc. The commit probably gives a tiny fraction of
>>> percent improvement or does not change anything. Do you have results?
>> It's a good question. I thought thank mempool should be faster than malloc.
>>
>> We can easily drop this commit. I had some doubts about it.
> According to the benchmarks it seems the mempool here is slower.
> I suggest to drop this commit.


No problem. I removed commit from the branch 
(https://github.com/tarantool/tarantool/commits/olegrok/fiber-ref)




More information about the Tarantool-patches mailing list