From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Ilya Kosarev <i.kosarev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] memtx: allow quota overuse for truncation
Date: Tue, 22 Dec 2020 15:22:06 +0100 [thread overview]
Message-ID: <c084ac19-3833-c718-6bb5-d3b12077277a@tarantool.org> (raw)
In-Reply-To: <1608646450.857716758@f406.i.mail.ru>
On 22.12.2020 15:14, Ilya Kosarev wrote:
> Вторник, 22 декабря 2020, 16:28 +03:00 от Vladislav Shpilevoy <v.shpilevoy@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?
prev parent reply other threads:[~2020-12-22 14:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 15:37 Ilya Kosarev
2020-12-14 23:41 ` Vladislav Shpilevoy
2020-12-16 23:43 ` Ilya Kosarev
2020-12-20 16:13 ` Vladislav Shpilevoy
2020-12-21 18:15 ` Ilya Kosarev
2020-12-22 13:28 ` Vladislav Shpilevoy
2020-12-22 14:14 ` Ilya Kosarev
2020-12-22 14:22 ` 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=c084ac19-3833-c718-6bb5-d3b12077277a@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=i.kosarev@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] memtx: allow quota overuse for truncation' \
/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