* [dts] [PATCH] fix hugepage not mount when host hugepage size is 1G
@ 2015-06-19 8:36 Yong Liu
0 siblings, 0 replies; only message in thread
From: Yong Liu @ 2015-06-19 8:36 UTC (permalink / raw)
To: dts
From: Marvin Liu <yong.liu@intel.com>
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/framework/dut.py b/framework/dut.py
index 461cdcb..7a47fe3 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -261,6 +261,7 @@ class Dut(Crb):
if self.virttype == 'XEN':
return
hugepages_size = self.send_expect("awk '/Hugepagesize/ {print $2}' /proc/meminfo", "# ")
+ total_huge_pages = self.get_total_huge_pages()
if int(hugepages_size) < (1024 * 1024):
if self.architecture == "x86_64":
@@ -271,13 +272,12 @@ class Dut(Crb):
elif self.architecture == "x86_x32":
arch_huge_pages = hugepages if hugepages > 0 else 256
- total_huge_pages = self.get_total_huge_pages()
-
- self.mount_huge_pages()
if total_huge_pages != arch_huge_pages:
self.set_huge_pages(arch_huge_pages)
- self.hugepage_path = self.strip_hugepage_path()
+
+ self.mount_huge_pages()
+ self.hugepage_path = self.strip_hugepage_path()
def setup_memory_freebsd(self, hugepages=-1):
"""
--
1.9.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-19 8:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19 8:36 [dts] [PATCH] fix hugepage not mount when host hugepage size is 1G Yong Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).