From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Zhouping Liu <zliu@redhat.com>
Cc: LTP list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] hugetlb: add a new function get_available_hugepages
Date: Mon, 09 Jul 2012 10:29:36 +0800 [thread overview]
Message-ID: <4FFA4210.607@cn.fujitsu.com> (raw)
In-Reply-To: <2e6144c3-13ca-4b3b-8b02-cd7cee9f25d0@zmail13.collab.prod.int.phx2.redhat.com>
On 07/07/2012 11:30 PM, Zhouping Liu wrote:
> Hi,
>
>> From: "Zhouping Liu" <zliu@redhat.com>
>> To: "LTP list" sourceforge.net>
>> Sent: Saturday, July 7, 2012 11:14:38 PM
>> Subject: [LTP] [PATCH] hugetlb: add a new function get_available_hugepages
>>
>> on some systems with small RAM, there aren't enough memory
>> to set as specific hugepages, such as 128 hugepages, it will
>> fail like this:
>> [root@localhost hugemmap]# ./hugemmap01
>> hugemmap01 0 TINFO : set nr_hugepages to 128
>> hugemmap01 1 TBROK : nr_hugepages = 55, but expect 128
>> hugemmap01 2 TBROK : Remaining cases broken
>> hugemmap01 0 TINFO : set nr_hugepages to 54
>>
>> we can detect whether the system has the power to get the specific
>> hugepages through the following commands:
>>
>> [root@localhost hugemmap]# echo 128 > /proc/sys/vm/nr_hugepages
>> [root@localhost hugemmap]# cat /proc/sys/vm/nr_hugepages
>> 55
>>
>> as we know, on this system, there are 55 available hugepages, so we
>> can set 55 hugepages to continue the case, but to exit the case,
>> and this is desinged into get_available_hugepages() functions.
>
> I have tested on some systems.
> a. test on a low memory:
> [root@localhost hugemmap]# ./hugemmap01
> hugemmap01 0 TINFO : set nr_hugepages to 128
> hugemmap01 0 TINFO : There're 56 available hugepages
> hugemmap01 0 TINFO : set nr_hugepages to 56
> hugemmap01 1 TPASS : call succeeded
> hugemmap01 0 TINFO : set nr_hugepages to 0
>
> b. try to set overcommit hugepages:
> [root@localhost hugemmap]# ./hugemmap01 -s 1000
> hugemmap01 0 TINFO : set nr_hugepages to 1000
> hugemmap01 0 TINFO : There're 363 available hugepages
> hugemmap01 0 TINFO : set nr_hugepages to 363
> hugemmap01 1 TPASS : call succeeded
> hugemmap01 0 TINFO : set nr_hugepages to 0
pushed, thank you.
Wanlong Gao
>
> Thanks,
> Zhouping
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2012-07-09 2:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-07 15:14 [LTP] [PATCH] hugetlb: add a new function get_available_hugepages Zhouping Liu
2012-07-07 15:14 ` [LTP] [PATCH] safe_macros: add SAFE_STRTOUL Zhouping Liu
2012-07-07 15:40 ` Zhouping Liu
2012-07-07 15:30 ` [LTP] [PATCH] hugetlb: add a new function get_available_hugepages Zhouping Liu
2012-07-09 2:29 ` Wanlong Gao [this message]
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=4FFA4210.607@cn.fujitsu.com \
--to=gaowanlong@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=zliu@redhat.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