Support metainformation in the slab allocator

Registered by Kostja Osipov

Box tuples are reference-counted. The counter is stored in the tuple, as one of the first tuple struct members.
When forking to save a snapshot, reference counters lead to excessive page splits, since they are incremented even for SELECTs.
We need to store tuple reference counters on their own mmap pages, so that we can quickly munmap these pages right after fork() performed by SAVE SNAPSHOT.

This seems to be most properly implemented on the level of salloc, Tarantool slab allocator.
salloc should be extended to allow allocation of "meta" information associated with each tuple, and the reference counters should be stored in this "meta" information.
Meta information needs to be stored on its own mmap() page, and we should be
able to quickly jump from tuple address to the address of its metadata,
and increment/decrement reference counters, as well as munmap() reference counters in bulk (munmap, however, should not be needed, since as long as reference counters are stored in compact format, performance impact of excessive page splits will be negligible).

See also branch core-split-slab-alloc.

Blueprint information

Status:
Not started
Approver:
Kostja Osipov
Priority:
Undefined
Drafter:
Kostja Osipov
Direction:
Needs approval
Assignee:
Aleksey Demakov
Definition:
Approved
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.