|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v4 0/4] 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: use size instead of order in palloc and pfree apis" updates
the palloc and pfree api to take size parameters instead of order.
Furthermore "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 v4:
- call uk_palloc and uk_pfree with size argument __PAGE_SIZE in uk_malloc_page
and uk_free_page.
Hugo Lefeuvre (4):
lib/ukalloc: use size instead of order in palloc and pfree apis
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/alloc.c | 149 +++++++++++++++++++++---------------
lib/ukalloc/exportsyms.uk | 3 +
lib/ukalloc/include/uk/alloc.h | 25 +++---
lib/ukalloc/include/uk/alloc_impl.h | 22 +++++-
lib/ukallocbbuddy/bbuddy.c | 18 ++++-
lib/uksched/sched.c | 4 +-
plat/xen/drivers/9p/9pfront.c | 20 ++---
7 files changed, 154 insertions(+), 87 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 |