public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] memcg/stress: Lower swap memory use
@ 2020-01-17  6:36 Petr Vorel
  2020-01-19  8:33 ` Li Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Petr Vorel @ 2020-01-17  6:36 UTC (permalink / raw)
  To: ltp

Fix freeze on systems, where where swap size is more
or less equal to a system RAM.

Fixes: #632

Reported-by: Zuo Liu <lz843723683@gmail.com>
Tested-by: Zuo Liu <lz843723683@gmail.com>
Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
index ad8605e16..a48d21e6e 100755
--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
@@ -33,7 +33,7 @@ setup()
 	local swap_free=`cat /proc/meminfo | grep SwapFree | awk '{ print $2 }'`
 	local pgsize=`tst_getconf PAGESIZE`
 
-	MEM=$(( $mem_free + $swap_free / 2 ))
+	MEM=$(( $mem_free + $swap_free / 1O ))
 	MEM=$(( $MEM / 1024 ))
 	RUN_TIME=$(( 15 * 60 ))
 	[ "$pgsize" = "4096" ] && THREAD_SPARE_MB=1 || THREAD_SPARE_MB=8
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [LTP] [PATCH 1/1] memcg/stress: Lower swap memory use
  2020-01-17  6:36 [LTP] [PATCH 1/1] memcg/stress: Lower swap memory use Petr Vorel
@ 2020-01-19  8:33 ` Li Wang
  2020-01-21 14:14 ` Cyril Hrubis
  2020-03-04 11:48 ` Petr Vorel
  2 siblings, 0 replies; 4+ messages in thread
From: Li Wang @ 2020-01-19  8:33 UTC (permalink / raw)
  To: ltp

Ack.

On Fri, Jan 17, 2020, 07:36 Petr Vorel <pvorel@suse.cz> wrote:

> Fix freeze on systems, where where swap size is more
> or less equal to a system RAM.
>
> Fixes: #632
>
> Reported-by: Zuo Liu <lz843723683@gmail.com>
> Tested-by: Zuo Liu <lz843723683@gmail.com>
> Suggested-by: Cyril Hrubis <chrubis@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
> a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> index ad8605e16..a48d21e6e 100755
> --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> @@ -33,7 +33,7 @@ setup()
>         local swap_free=`cat /proc/meminfo | grep SwapFree | awk '{ print
> $2 }'`
>         local pgsize=`tst_getconf PAGESIZE`
>
> -       MEM=$(( $mem_free + $swap_free / 2 ))
> +       MEM=$(( $mem_free + $swap_free / 1O ))
>         MEM=$(( $MEM / 1024 ))
>         RUN_TIME=$(( 15 * 60 ))
>         [ "$pgsize" = "4096" ] && THREAD_SPARE_MB=1 || THREAD_SPARE_MB=8
> --
> 2.24.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200119/b33cf33a/attachment.htm>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH 1/1] memcg/stress: Lower swap memory use
  2020-01-17  6:36 [LTP] [PATCH 1/1] memcg/stress: Lower swap memory use Petr Vorel
  2020-01-19  8:33 ` Li Wang
@ 2020-01-21 14:14 ` Cyril Hrubis
  2020-03-04 11:48 ` Petr Vorel
  2 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2020-01-21 14:14 UTC (permalink / raw)
  To: ltp

Hi!
> Fix freeze on systems, where where swap size is more
> or less equal to a system RAM.
> 
> Fixes: #632
> 
> Reported-by: Zuo Liu <lz843723683@gmail.com>
> Tested-by: Zuo Liu <lz843723683@gmail.com>
> Suggested-by: Cyril Hrubis <chrubis@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> index ad8605e16..a48d21e6e 100755
> --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> @@ -33,7 +33,7 @@ setup()
>  	local swap_free=`cat /proc/meminfo | grep SwapFree | awk '{ print $2 }'`
>  	local pgsize=`tst_getconf PAGESIZE`
>  
> -	MEM=$(( $mem_free + $swap_free / 2 ))
> +	MEM=$(( $mem_free + $swap_free / 1O ))

I wonder if we can be a bit smarter about this. Maybe we should add some
percentage of RAM if enough swap is present.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH 1/1] memcg/stress: Lower swap memory use
  2020-01-17  6:36 [LTP] [PATCH 1/1] memcg/stress: Lower swap memory use Petr Vorel
  2020-01-19  8:33 ` Li Wang
  2020-01-21 14:14 ` Cyril Hrubis
@ 2020-03-04 11:48 ` Petr Vorel
  2 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2020-03-04 11:48 UTC (permalink / raw)
  To: ltp

ji,

> -	MEM=$(( $mem_free + $swap_free / 2 ))
> +	MEM=$(( $mem_free + $swap_free / 1O ))
Sorry, this is a typo, it's "o", but it must be 0.
MEM=$(( $mem_free + $swap_free / 10 ))

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-04 11:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-17  6:36 [LTP] [PATCH 1/1] memcg/stress: Lower swap memory use Petr Vorel
2020-01-19  8:33 ` Li Wang
2020-01-21 14:14 ` Cyril Hrubis
2020-03-04 11:48 ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox