public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Zhouping Liu <zliu@redhat.com>
To: LTP list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH 3/3] tunable/min_free_kbytes: add 32-bit system limit
Date: Thu, 30 Aug 2012 22:07:00 -0400 (EDT)	[thread overview]
Message-ID: <850600673.62700357.1346378820659.JavaMail.root@redhat.com> (raw)
In-Reply-To: <92b6d1dd1bba3ce81f5f51612e99a23ed2409b7e.1346244062.git.zliu@redhat.com>



----- Original Message -----
> From: "Zhouping Liu" <zliu@redhat.com>
> To: "LTP list" <ltp-list@lists.sourceforge.net>
> Sent: Wednesday, August 29, 2012 8:43:59 PM
> Subject: [LTP] [PATCH 3/3] tunable/min_free_kbytes: add 32-bit system limit
> 
> in 32-bit system, one process only allocate 3Gb memory at
> least, even though there are enough memory and setting

I'm sorry that the above sentences has a typo, 'at least' should be
changed as 'at most', so maintainers, please correct it if you apply the patch.
please let me know if you need me send a V2.

Thanks,
Zhouping

> overcommit_memory=1, the porcess always exit when it arrives
> in 3Gb memory.
> 
> the patch use '__WORDSIZE' macro to avoid the incorrect 'TFAIL'
> without the patch:
>  ---- snip ----
>  min_free_kbytes    0  TINFO  :  set overcommit_memory to 1
>  min_free_kbytes    0  TINFO  :  set min_free_kbytes to 3794
>  memfree is 15478420 kB before eatup mem
>  memfree is 12333408 kB after eatup mem
>  min_free_kbytes    3  TFAIL  :  child unexpectedly failed: 0
>  min_free_kbytes    0  TINFO  :  set min_free_kbytes to 7588
>  ---- snip ----
> 
> after applying the patch:
>  ---- snip ----
>  min_free_kbytes    0  TINFO  :  set overcommit_memory to 1
>  min_free_kbytes    0  TINFO  :  set min_free_kbytes to 3794
>  memfree is 15478420 kB before eatup mem
>  memfree is 12333408 kB after eatup mem
>  min_free_kbytes    0  TINFO  :  Child can't allocate >3Gb memory in
>  32bit system
>  min_free_kbytes    0  TINFO  :  set min_free_kbytes to 7588
>  ---- snip ----
> 
> Reported-by: Shuang Qiu <shuang.qiu@oracle.com>
> Signed-off-by: Zhouping Liu <zliu@redhat.com>
> ---
>  testcases/kernel/mem/tunable/min_free_kbytes.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c
> b/testcases/kernel/mem/tunable/min_free_kbytes.c
> index dde182c..873b807 100644
> --- a/testcases/kernel/mem/tunable/min_free_kbytes.c
> +++ b/testcases/kernel/mem/tunable/min_free_kbytes.c
> @@ -158,8 +158,19 @@ static void test_tune(unsigned long
> overcommit_policy)
>  				    "child unexpectedly failed: %d", status);
>  		} else if (overcommit_policy == 1) {
>  			if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGKILL)
> +#if __WORDSIZE == 32
> +			{
> +				if (total_mem < 3145728UL)
> +#endif
>  				tst_resm(TFAIL,
>  				    "child unexpectedly failed: %d", status);
> +#if __WORDSIZE == 32
> +	/* in 32-bit system, a process allocate about 3Gb memory at most */
> +				else
> +					tst_resm(TINFO, "Child can't allocate "
> +					    ">3Gb memory in 32bit system");
> +			}
> +#endif
>  		} else {
>  			if (WIFEXITED(status)) {
>  				if (WEXITSTATUS(status) != 0) {
> --
> 1.7.11.2
> 
> 

------------------------------------------------------------------------------
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

  reply	other threads:[~2012-08-31  2:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 12:42 [LTP] [PATCH 1/3] tunable: reduce the min_free_kbytes tunable Zhouping Liu
2012-08-29 12:43 ` [LTP] [PATCH 2/3] tunable/min_free_kbytes: remove map_count args Zhouping Liu
2012-08-29 12:43 ` [LTP] [PATCH 3/3] tunable/min_free_kbytes: add 32-bit system limit Zhouping Liu
2012-08-31  2:07   ` Zhouping Liu [this message]
2012-08-31  2:11     ` Wanlong Gao
2012-08-31  2:17       ` Zhouping Liu
2012-08-31  2:44   ` Caspar Zhang
2012-08-31  2:54     ` Wanlong Gao

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=850600673.62700357.1346378820659.JavaMail.root@redhat.com \
    --to=zliu@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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