[Tarantool-patches] [small] Revert "Free all slabs on region reset"

Konstantin Osipov kostja.osipov at gmail.com
Thu Jan 30 00:41:22 MSK 2020


* Alexander Turenko <alexander.turenko at tarantool.org> [20/01/29 11:11]:
> This reverts commit 67d7ab44ab09df3356929e3692a03321b31f3ebb.
> 
> The goal of the reverted commit was to fix flaky fails of tarantool
> tests that checks amount of memory used by a fiber:
> 
>  | fiber.info()[fiber.self().id()].memory.used
> 
> It also attempts to overcome the situation when a fiber holds some
> amount of memory, which is not used in any way. The high limit of such
> memory is controlled by a threshold in fiber_gc() tarantool's function
> (128 KiB at the moment):

The commit by Georgy was doing the right thing, it just had a bug
in it. I saw Georgy posted a fix for his commit - but I haven't
seen it on the list.

Why revert this commit rather than fix it? It should be pretty
strightforward to fix, no?

The fix is to avoid iterating over all the free slabs when we
failed to find the right slab size several times, and just get a
new slab at once. I'd even say that Georgy's commit was entirely
correct, it just didn't account for the "land mine" it is setting
for alloc case.

Thoughts?


-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list