memcg/stress: Lower swap memory use
PATCH 1/1 memcg/stress: Lower swap memory use
Fix freeze on systems, where where swap size is more or less equal to a system RAM.
--- testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh +1 -1
@@ -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
Signature · 1 line
2.24.1
PATCH 1/1 memcg/stress: Lower swap memory use
Ack.
Quoted 33 lines · On Fri, Jan 17, 2020, 07:36 Petr Vorel <[email protected]> wrote:
Fix freeze on systems, where where swap size is more or less equal to a system RAM.
Fixes #632Reported-by Zuo Liu <[email protected]>Tested-by Zuo Liu <[email protected]>Suggested-by Cyril Hrubis <[email protected]>Signed-off-by Petr Vorel <[email protected]>--- 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.shb/testcases/kernel/controllers/memcg/stress/memcg_stress_test.shindexad8605e16..a48d21e6e100755testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh +0
-0@@ -33,7 +33,7 @@ setup() local swap_free=`cat /proc/meminfo | grep SwapFree | awk '{ print$2 }'`
local pgsize=tst_getconf PAGESIZEtestcases/kernel/controllers/memcg/stress/memcg_stress_test.sh +1
-2- 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
Quoted 4 lines
--
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>
PATCH 1/1 memcg/stress: Lower swap memory use
In reply to Petr VorelHi!
Quoted 18 lines
Fix freeze on systems, where where swap size is more or less equal to a system RAM.
Fixes #632Reported-by Zuo Liu <[email protected]>Tested-by Zuo Liu <[email protected]>Suggested-by Cyril Hrubis <[email protected]>Signed-off-by Petr Vorel <[email protected]>--- testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh +0
-0
testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh setup() · line 36
Quoted 5 lines
testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh +1
-1@@ -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.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 memcg/stress: Lower swap memory use
In reply to Petr Vorelji,
testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh setup() · line 36
Quoted 2 lines
testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh +1
-1- 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