From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 47372902 for ; Fri, 19 Jun 2015 10:36:49 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 19 Jun 2015 01:36:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,643,1427785200"; d="scan'208";a="746366456" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 19 Jun 2015 01:36:47 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t5J8ak5f017147; Fri, 19 Jun 2015 16:36:46 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t5J8ailJ020125; Fri, 19 Jun 2015 16:36:46 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t5J8ahiX020121; Fri, 19 Jun 2015 16:36:43 +0800 From: Yong Liu To: dts@dpdk.org Date: Fri, 19 Jun 2015 16:36:42 +0800 Message-Id: <1434703002-20089-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] fix hugepage not mount when host hugepage size is 1G X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 08:36:49 -0000 From: Marvin Liu Signed-off-by: Marvin Liu 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