]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commit
Remove MINIMUM_OBJECT_SIZE
authorOwen Smith <owen.smith@citrix.com>
Mon, 19 Jul 2021 10:03:34 +0000 (11:03 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Mon, 19 Jul 2021 14:14:31 +0000 (15:14 +0100)
commit8129771cda341d8bc8d57647bf2b64e4333494ea
treeb35df62981ea6e530d07f39f7d9a514382bb0119
parentc7a014320dbfacf8b744283695b1d4262740e602
Remove MINIMUM_OBJECT_SIZE

MINIMUM_OBJECT_SIZE would make all cached objects at least 0x80 bytes, which
would limit the number of objects in each slab to 31 objects.

This limitation is not needed, as the slab's mask is dynamically allocated to
cope with the correct number of objects that can fit into a single slab.
Cache object's sizes are rounded up to the nearest pointer boundary to maintain
object alignment. Removing the minimum size allows more objects per cache slab,
reducing the memory overhead of caches.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/xenbus/cache.c