From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E04A5941E for ; Wed, 6 Jan 2016 04:27:57 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 05 Jan 2016 19:27:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,527,1444719600"; d="scan'208";a="721008358" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by orsmga003.jf.intel.com with ESMTP; 05 Jan 2016 19:27:55 -0800 From: "xu,huilong" To: dts@dpdk.org Date: Wed, 6 Jan 2016 11:23:31 +0800 Message-Id: <1452050611-7029-2-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1452050611-7029-1-git-send-email-huilongx.xu@intel.com> References: <1452050611-7029-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] [PATCH V1 2/2] when dut not support numa, set hugepage on all socket 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: Wed, 06 Jan 2016 03:27:58 -0000 Signed-off-by: xu,huilong --- framework/crb.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/framework/crb.py b/framework/crb.py index 525d6a1..6c2a9b9 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -164,7 +164,15 @@ class Crb(object): if numa == -1: self.send_expect('echo %d > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages' % huge_pages, '# ', 5) else: - self.send_expect('echo %d > /sys/devices/system/node/node%d/hugepages/hugepages-2048kB/nr_hugepages' % (huge_pages, numa), '# ', 5) + #sometimes we set hugepage on kernel cmdline, so we need clear default hugepage + self.send_expect('echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages', '# ', 5) + + #some platform not support numa, example vm dut + try: + self.send_expect('echo %d > /sys/devices/system/node/node%d/hugepages/hugepages-2048kB/nr_hugepages' % (huge_pages, numa), '# ', 5) + except: + self.logger.warning("set %d hugepage on socket %d error" % (huge_pages, numa)) + self.send_expect('echo %d > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages' % huge_pages, '# ', 5) def set_speedup_options(self, read_cache, skip_setup): """ -- 1.9.3