[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [UNIKRAFT PATCH v5 0/5] Memory Pools
Hi, Simon. This looks good. The interface is clean and well documented. One minor thing is a patch doesn't apply to the current staging version of Unikraft, I'll mark the issue in the respective patch e-mail. Razvan Simon Kuenzer <simon.kuenzer@xxxxxxxxx> writes: > This series implements a memory pool allocator. Pool objects have the same > size and are pre-allocated. Due to this simplification allocations and free > operations are as cheap as O(1). Its intended use is performance critical > allocations when allocation sizes do not vary, like network stacks or disk > buffer caches. > > Changes since v4: > - Fix interface descriptions in headers > - Add a crash (UK_CRASH) as current workaround when free'ing a > ukallocpool with `ukalloc` interface. The reason is that > unregistering from ukalloc is not yet supported. Having a pool > still registered to `ukalloc` although being freed will cause to > use-after-free bugs. > > - Make each patch individually compile'able: There was an incorrect > patch split introduced with v4 > > Changes since v3: > - Remove functionality to let initialize objects by the pool. > This should be implemented with a wrapping function instead and > maybe less confusing when using the pool with the uk_alloc API. > - Provide `uk_allocpool_objlen()` > - Fix `uk_allocpool2ukalloc()`, the interface was not exported properly > > Changes since v2: > - Fix compile error when `CONFIG_LIBUKALLOC_IFSTATS` is activated > > Changes since v1: > - Correct license header in `pool.c` > > Simon Kuenzer (5): > lib/ukallocpool: Library skeleton > lib/ukallocpool: LIFO pool implementation > lib/ukallocpool: Allocate pool on parent allocator > lib/ukallocpool: `lib/ukalloc` compatible interface > lib/ukallocpool: Batched allocation > > lib/Makefile.uk | 1 + > lib/ukallocpool/Config.uk | 6 + > lib/ukallocpool/Makefile.uk | 6 + > lib/ukallocpool/exportsyms.uk | 11 + > lib/ukallocpool/include/uk/allocpool.h | 206 ++++++++++++++ > lib/ukallocpool/pool.c | 354 +++++++++++++++++++++++++ > 6 files changed, 584 insertions(+) > create mode 100644 lib/ukallocpool/Config.uk > create mode 100644 lib/ukallocpool/Makefile.uk > create mode 100644 lib/ukallocpool/exportsyms.uk > create mode 100644 lib/ukallocpool/include/uk/allocpool.h > create mode 100644 lib/ukallocpool/pool.c
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |