[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v6 0/5] add support for generic memory allocators
This patch series addresses a few bugs and design issues in ukalloc in order to ease the port of new allocators to unikraft. "lib/ukalloc: cleanup page allocation interface" and "lib/ukalloc: change page allocation api to take a number of pages" both clean up the memory allocation api, removing unused macros, undefined functions and modifying the palloc and pfree api to take as parameter a number of pages instead of an order. "lib/ukalloc: implement new allocator helpers" implements new helpers for generic, malloc based memory allocators. Unfortunately, using this patch with a generic allocator results in page fault during uk_thread_current because the stack is not aligned at STACK_SIZE. This is because the stack is allocated via palloc and not posix_memalign, hence only guaranteeing page alignment. We address this issue in "lib/uksched: use posix_memalign to allocate stack" and "lib/ukalloc: fix multiple issues in uk_posix_memalign_ifpages" which adds support for alignment > page size to uk_posix_memalign_ifpages. This patch also addresses an out-of-bounds issue in uk_posix_memalign_ifpages with allocation aligned at less than a page. Changes v6: - add "lib/ukalloc: cleanup page allocation interface" - address a metadata underflow in the uk_posix_memalign_ifpages changes introduced by "lib/ukalloc: fix multiple issues in uk_posix_memalign_ifpages" Hugo Lefeuvre (5): lib/ukalloc: cleanup page allocation interface lib/ukalloc: change page allocation api to take a number of pages lib/ukalloc: fix multiple issues in uk_posix_memalign_ifpages lib/uksched: use posix_memalign to allocate stack lib/ukalloc: implement new allocator helpers lib/ukalloc/Config.uk | 6 -- lib/ukalloc/alloc.c | 181 +++++++++++++++++++++++------------- lib/ukalloc/exportsyms.uk | 3 + lib/ukalloc/include/uk/alloc.h | 44 ++++----- lib/ukalloc/include/uk/alloc_impl.h | 27 ++++-- lib/ukallocbbuddy/Config.uk | 1 - lib/ukallocbbuddy/bbuddy.c | 26 +++++- lib/uksched/sched.c | 4 +- plat/xen/drivers/9p/9pfront.c | 15 ++- plat/xen/drivers/blk/blkfront.c | 4 +- plat/xen/gnttab.c | 2 +- plat/xen/x86/mm.c | 10 +- 12 files changed, 202 insertions(+), 121 deletions(-) -- 2.7.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |