From: Gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
To: dts <dts@dpdk.org>
Subject: [dts] [PATCH 1/9] framework: check hugepage size and add pages
Date: Fri, 26 Feb 2016 15:47:06 +0530 [thread overview]
Message-ID: <1456481834-10027-2-git-send-email-gowrishankar.m@linux.vnet.ibm.com> (raw)
In-Reply-To: <1456481834-10027-1-git-send-email-gowrishankar.m@linux.vnet.ibm.com>
Add number of huge pages according to enabled huge page size. Also, added
expected number of pages in case ppc_64 is DUT platform.
Signed-off-by: Gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
---
framework/crb.py | 10 ++++++----
framework/dut.py | 2 ++
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/framework/crb.py b/framework/crb.py
index f2009b9..c6fd9fb 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -161,18 +161,20 @@ class Crb(object):
"""
Set numbers of huge pages
"""
+ page_size = self.send_expect("awk '/Hugepagesize/ {print $2}' /proc/meminfo", "# ")
+
if numa == -1:
- self.send_expect('echo %d > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages' % huge_pages, '# ', 5)
+ self.send_expect('echo %d > /sys/kernel/mm/hugepages/hugepages-%skB/nr_hugepages' % (huge_pages, page_size), '# ', 5)
else:
#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)
+ self.send_expect('echo 0 > /sys/kernel/mm/hugepages/hugepages-%skB/nr_hugepages' % (page_size), '# ', 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)
+ self.send_expect('echo %d > /sys/devices/system/node/node%d/hugepages/hugepages-%skB/nr_hugepages' % (huge_pages, numa, page_size), '# ', 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)
+ self.send_expect('echo %d > /sys/kernel/mm/hugepages/hugepages-%skB/nr_hugepages' % (huge_pages. page_size), '# ', 5)
def set_speedup_options(self, read_cache, skip_setup):
"""
diff --git a/framework/dut.py b/framework/dut.py
index bd437cb..c57aa79 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -301,6 +301,8 @@ class Dut(Crb):
elif self.architecture == "x86_x32":
arch_huge_pages = hugepages if hugepages > 0 else 256
force_socket = True
+ elif self.architecture == "ppc_64":
+ arch_huge_pages = hugepages if hugepages > 0 else 512
if total_huge_pages != arch_huge_pages:
# before all hugepage average distribution by all socket,
--
1.7.10.4
next prev parent reply other threads:[~2016-02-26 10:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 10:17 [dts] framework: hugepages, cpuinfo, connect x3 support and bug fixes Gowrishankar
2016-02-26 10:17 ` Gowrishankar [this message]
2016-02-26 10:17 ` [dts] [PATCH 2/9] framework: platform independent cpu info parsing Gowrishankar
2016-02-29 2:13 ` Xu, HuilongX
2016-03-01 3:14 ` gowrishankar
2016-03-01 12:42 ` Liu, Yong
2016-03-09 5:50 ` Xu, HuilongX
2016-02-26 10:17 ` [dts] [PATCH 3/9] framework: include domain id in pci tuple Gowrishankar
2016-02-26 10:17 ` [dts] [PATCH 4/9] framework: enable connect X3 support Gowrishankar
2016-03-01 13:17 ` Liu, Yong
2016-03-03 7:57 ` gowrishankar
2016-03-04 1:07 ` Liu, Yong
2016-02-26 10:17 ` [dts] [PATCH 5/9] framework: fix numa number lookup for a dev Gowrishankar
2016-02-26 10:17 ` [dts] [PATCH 6/9] framework: fix get_core_list to return all lcores Gowrishankar
2016-02-26 10:17 ` [dts] [PATCH 7/9] tests: fix multiprocess test to set coremask through library Gowrishankar
2016-02-26 10:17 ` [dts] [PATCH 8/9] tests: fix coremask test to check expected EAL output Gowrishankar
2016-02-26 10:17 ` [dts] [PATCH 9/9] tests: fix blacklist test to discard extra pci domain id in verification string Gowrishankar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456481834-10027-2-git-send-email-gowrishankar.m@linux.vnet.ibm.com \
--to=gowrishankar.m@linux.vnet.ibm.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).