Richard Fuchs
859ac06626
MT#55283 use non-glib atomic macros in more places
Change-Id: Ia1e92f1d665a1773d25160a1ed4e4e93ae7b8ec2
8 months ago
Richard Fuchs
bcbe751dec
MT#55283 make bufferpool (mostly) lock-free
Change-Id: I9c6803c3b01deacafc20bcca4c6ddd89fd69d3e9
9 months ago
Richard Fuchs
95f75d690b
MT#55283 use embedded links in bufferpool
Avoids repeated calls to allocator
Change-Id: I2b85fef3d0fd976bc9bf8a4b0cb9b29b62318cbf
9 months ago
Richard Fuchs
58054f2c0f
MT#55283 use typed queue for bpool shards
Change-Id: Iebe8286a930add93a179cbf0dabc08ea23152f37
9 months ago
Richard Fuchs
0551c2549a
MT#55283 obsolete bufferpool shard array
Remove the sorted pointer array and the associated lock. We can now
directly look up the shard associated with a particular memory block and
so this isn't needed any more.
Change-Id: I6b2972c3b8837cdabdf92cf957c69dc2d559a06c
9 months ago
Richard Fuchs
d43575dc06
MT#55283 look up bufferpool shard from metadata
Use the pointer we stored as metadata to quickly look up the respective
shard.
Change-Id: I01c39d9dbe229bb9bd98d90efb95adfe076e426d
9 months ago
Richard Fuchs
69e634f94a
MT#55283 store metadata head pointer
Put a pointer to the shard itself in the beginning of the buffer. This
facilitates quick lookup.
Change-Id: I0109d77e56afac3189775dd708970288f175dfe6
9 months ago
Richard Fuchs
9bd5670f89
MT#55283 use fixed allocation size
Allocate all bufferpool shards of the same size, regardless of
underlying allocator. This way increase memory usage a bit, but we're
already quite heavy on that, so no big deal.
Change-Id: Icbe09cd2f9b33bc58ab1efe7de293dea00236fec
9 months ago
Richard Fuchs
1a837e6ab1
MT#55283 add `empty` pointer
With this we can reserve some head room to store our own metadata.
Change-Id: I525c2df7db85ce22c0a4a9810e4c75fdd7731c0c
9 months ago
Richard Fuchs
5f9e43b3e0
MT#55283 move alignment macros to header file
Change-Id: I266cbefe8351f77399bb6e50b2122f9a45249529
9 months ago
Richard Fuchs
1a98502a1b
MT#55283 used aligned memory for bufferpool
Use allocators that return memory blocks aligned to the requested size,
instead of generic malloc. This makes it easier to play tricks with the
memory blocks.
Change-Id: Iad4b1127c76e48c2e9b4ad8489118d4883a24f6a
9 months ago
Richard Fuchs
ef7aa06801
MT#55283 shorten lock duration
We can do the freeing safely after having removed the shard from the
list.
Change-Id: I15d7ec71b0c44b916571c420b07c715ad2feaf50
9 months ago
Richard Fuchs
ad8ce3541d
MT#61822 add RWLOCK_STATIC_INIT
Change-Id: I6718df967b70554a32c3caddcb4e29af4fb6d7f0
11 months ago
Richard Fuchs
872c06d1cc
MT#55283 add bufferpool implementation
Manages a pool of bump allocators that allow re-use of buffers after
they become empty
Change-Id: Id677a2e18b39c2261b8ceae31056d4ad9125bf2c
2 years ago