test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, LijuanX A" <lijuanx.a.tu@intel.com>
To: "Xu, HuilongX" <huilongx.xu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH V1 2/2] when dut not support numa, set hugepage on all socket
Date: Thu, 7 Jan 2016 03:04:53 +0000	[thread overview]
Message-ID: <38D041F150D4184C8114E499040E623407264CC4@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1452050611-7029-2-git-send-email-huilongx.xu@intel.com>

Tested-by: gu,yongjie <yongjiex.gu@intel.com>

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong
> Sent: Wednesday, January 06, 2016 11:24 AM
> To: dts@dpdk.org
> Subject: [dts] [PATCH V1 2/2] when dut not support numa, set hugepage
> on all socket
> 
> 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

  reply	other threads:[~2016-01-07  3:05 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 ` [dts] [PATCH V1 2/2] when dut not support numa, set hugepage on all socket xu,huilong
2016-01-07  3:04   ` Tu, LijuanX A [this message]
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=38D041F150D4184C8114E499040E623407264CC4@shsmsx102.ccr.corp.intel.com \
    --to=lijuanx.a.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=huilongx.xu@intel.com \
    /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).