From: "xu,huilong" <huilongx.xu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH V1 2/2] when dut not support numa, set hugepage on all socket
Date: Wed, 6 Jan 2016 11:23:31 +0800 [thread overview]
Message-ID: <1452050611-7029-2-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1452050611-7029-1-git-send-email-huilongx.xu@intel.com>
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
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
next prev parent reply other threads:[~2016-01-06 3:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 3:23 [dts] [PATCH V1 1/2] set hugepage on socket 0 xu,huilong
2016-01-06 3:23 ` xu,huilong [this message]
2016-01-07 3:04 ` [dts] [PATCH V1 2/2] when dut not support numa, set hugepage on all socket Tu, LijuanX A
2016-01-07 9:32 ` Liu, Yong
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=1452050611-7029-2-git-send-email-huilongx.xu@intel.com \
--to=huilongx.xu@intel.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).