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

[Minios-devel] [UNIKRAFT PATCH 5/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>
---
 plat/linuxu/Makefile.uk |  2 ++
 plat/linuxu/memory.c    | 17 ++++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/plat/linuxu/Makefile.uk b/plat/linuxu/Makefile.uk
index 2c0de76..281b5c8 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 addplatlib_paramprefix,linuxu,liblinuxuplat,linuxu))
 ##
 ## Platform library definitions
 ##
diff --git a/plat/linuxu/memory.c b/plat/linuxu/memory.c
index 35d0d95..6b98acb 100644
--- a/plat/linuxu/memory.c
+++ b/plat/linuxu/memory.c
@@ -33,9 +33,24 @@
  * 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>
+#ifdef CONFIG_LIBUKLIBPARAM
+#include <uk/libparam.h>
+#endif /* CONFIG_LIBUKLIBPARAM */
+
+#define MB2B           (1024 * 1024)
+
+static __u32 heap_size = CONFIG_LINUXU_DEFAULT_HEAPMB;
+#ifdef CONFIG_LIBUKLIBPARAM
+UK_LIB_PARAM(heap_size, __u32);
+#endif /* CONFIG_LIBUKLIBPARAM */
+
 
 int ukplat_memregion_count(void)
 {
-- 
2.7.4


_______________________________________________
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®.