[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH v3 6/8] plat/linuxu: Introduce heap size as a lib parameter



In linuxu platform, the user can overwrite the default heap size
parameter. In this patch we introduce the heap size argument as an
UK_LIB_PARAM which the user can modify at boot time.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>
---
 plat/linuxu/Makefile.uk |  2 ++
 plat/linuxu/memory.c    | 13 ++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/plat/linuxu/Makefile.uk b/plat/linuxu/Makefile.uk
index 512a4945..94516acd 100644
--- a/plat/linuxu/Makefile.uk
+++ b/plat/linuxu/Makefile.uk
@@ -8,6 +8,8 @@ $(eval $(call addplat_s,linuxu,$(CONFIG_PLAT_LINUXU)))
 ##
 $(eval $(call addplatlib,linuxu,liblinuxuplat))
 
+## Adding libparam for the linuxu platform
+$(eval $(call addlib_paramprefix,liblinuxuplat,linuxu))
 ##
 ## Platform library definitions
 ##
diff --git a/plat/linuxu/memory.c b/plat/linuxu/memory.c
index 8bfb645d..c5b32201 100644
--- a/plat/linuxu/memory.c
+++ b/plat/linuxu/memory.c
@@ -33,9 +33,20 @@
  * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
  */
 
+#include <errno.h>
+#include <uk/arch/types.h>
 #include <linuxu/setup.h>
-#include <uk/plat/memory.h>
+#include <uk/errptr.h>
 #include <uk/assert.h>
+#include <linuxu/syscall.h>
+#include <uk/plat/memory.h>
+#include <uk/libparam.h>
+
+#define MB2B           (1024 * 1024)
+
+static __u32 heap_size = CONFIG_LINUXU_DEFAULT_HEAPMB;
+UK_LIB_PARAM(heap_size, __u32);
+
 
 int ukplat_memregion_count(void)
 {
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.