[dts] [PATCH] fix hugepage not mount when host hugepage size is 1G

Yong Liu yong.liu at intel.com
Fri Jun 19 10:36:42 CEST 2015


From: Marvin Liu <yong.liu at intel.com>

Signed-off-by: Marvin Liu <yong.liu at 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



More information about the dts mailing list