[Tarantool-patches] [PATCH] memtx: allow quota overuse for truncation

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Dec 22 17:22:06 MSK 2020


On 22.12.2020 15:14, Ilya Kosarev wrote:
>     Вторник, 22 декабря 2020, 16:28 +03:00 от Vladislav Shpilevoy <v.shpilevoy at tarantool.org>:
>      
>     > Also I don't understand why can't you do that on the slab arena
>     > level. Start allocating only 'huge' slabs if the quota is full, but
>     > disabled.
>     >
>     > Yes, allocation in case of out of quota can be done on more
>     > internal level.
>     > But the problem is exactly in freeing you mentioned further.
>     > We need to free in the right way: If we are allocating with
>     > mempool, we need to use mempool_find() properly, while
>     > if we are allocating ‘huge’ slab, we need to free it accordingly.
>     > So the information about the allocation has to be stored
>     > somehow in case we are going to alter it depending on the
>     > current state. I don’t see convenient place where we can store
>     > it, looks like it will be even worse to store such information
>     > in struct tuple itself.
> 
>     I don't understand why do you need to store any info. Huge slabs
>     existed and were freed before your patch, and all worked fine here.
>     How are they found and freed with quota enabled?
> 
> Proper huge slabs are actually huge and mempool_find() thus
> returns NULL for them and they are freed properly. Here we are
> allocating «huge» slabs of the size which is the size of actual
> truncate tuples, and it is not really huge. Thus we need specific
> info to free it in the right way.

Ok, why can't you use the existing 'huge' slabs and not re-invent your
own ones?


More information about the Tarantool-patches mailing list