Skip to content

Commit

Permalink
memcg_lib.sh: Update 'PAGESIZES' for 6.1 kernel
Browse files Browse the repository at this point in the history
Post 6.1 kernel updates stat in batch (> 64 pages) every time
since commit 1813e51eece0ad6f4aacaeb738e7cced46feb470.

Update 'PAGESIZES' for 6.1 kernel, otherwise the testcase
memcg_max_usage_in_bytes_test.sh will fail and report:

memcg_max_usage_in_bytes_test 1 TINFO: timeout per run is 0h 5m 0s
memcg_max_usage_in_bytes_test 1 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
memcg_max_usage_in_bytes_test 1 TINFO: Test memory.max_usage_in_bytes
memcg_max_usage_in_bytes_test 1 TINFO: Running memcg_process --mmap-anon -s 4194304
memcg_max_usage_in_bytes_test 1 TINFO: Warming up pid: 17808
memcg_max_usage_in_bytes_test 1 TINFO: Process is still here after warm up: 17808
memcg_max_usage_in_bytes_test 1 TFAIL: memory.max_usage_in_bytes is 4456448, 4206592-4341760 expected
memcg_max_usage_in_bytes_test 2 TINFO: Test memory.memsw.max_usage_in_bytes
memcg_max_usage_in_bytes_test 2 TPASS: echo 8388608 > memory.limit_in_bytes passed as expected
memcg_max_usage_in_bytes_test 2 TPASS: echo 8388608 > memory.memsw.limit_in_bytes passed as expected
memcg_max_usage_in_bytes_test 2 TINFO: Running memcg_process --mmap-anon -s 4194304
memcg_max_usage_in_bytes_test 2 TINFO: Warming up pid: 17828
memcg_max_usage_in_bytes_test 2 TINFO: Process is still here after warm up: 17828
memcg_max_usage_in_bytes_test 2 TFAIL: memory.memsw.max_usage_in_bytes is 4456448, 4206592-4341760 expected
memcg_max_usage_in_bytes_test 3 TINFO: Test reset memory.max_usage_in_bytes
memcg_max_usage_in_bytes_test 3 TINFO: Running memcg_process --mmap-anon -s 4194304
memcg_max_usage_in_bytes_test 3 TINFO: Warming up pid: 17844
memcg_max_usage_in_bytes_test 3 TINFO: Process is still here after warm up: 17844
memcg_max_usage_in_bytes_test 3 TFAIL: memory.max_usage_in_bytes is 4456448, 4206592-4341760 expected
memcg_max_usage_in_bytes_test 3 TFAIL: memory.max_usage_in_bytes is 262144, 0-135168 expected
memcg_max_usage_in_bytes_test 4 TINFO: Test reset memory.memsw.max_usage_in_bytes
memcg_max_usage_in_bytes_test 4 TPASS: echo 8388608 > memory.limit_in_bytes passed as expected
memcg_max_usage_in_bytes_test 4 TPASS: echo 8388608 > memory.memsw.limit_in_bytes passed as expected
memcg_max_usage_in_bytes_test 4 TINFO: Running memcg_process --mmap-anon -s 4194304
memcg_max_usage_in_bytes_test 4 TINFO: Warming up pid: 17863
memcg_max_usage_in_bytes_test 4 TINFO: Process is still here after warm up: 17863
memcg_max_usage_in_bytes_test 4 TFAIL: memory.memsw.max_usage_in_bytes is 4456448, 4206592-4341760 expected
memcg_max_usage_in_bytes_test 4 TFAIL: memory.memsw.max_usage_in_bytes is 262144, 0-135168 expected
memcg_max_usage_in_bytes_test 5 TINFO: SELinux enabled in enforcing mode, this may affect test results
memcg_max_usage_in_bytes_test 5 TINFO: it can be disabled with TST_DISABLE_SELINUX=1 (requires super/root)
memcg_max_usage_in_bytes_test 5 TWARN: test interrupted
memcg_max_usage_in_bytes_test 5 TINFO: loaded SELinux profiles: kill

Summary:
passed   4
failed   6
broken   0
skipped  0
warnings 1

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
Reviewed-by: Yang Xu <xuyang2018.jy@fujitsu.com>
  • Loading branch information
zhaogongyi authored and xuyang0410 committed Dec 8, 2022
1 parent ff88cfa commit 2aaff45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testcases/kernel/controllers/memcg/functional/memcg_lib.sh
Expand Up @@ -402,7 +402,12 @@ if [ $? -ne 0 ]; then
fi

# Post 4.16 kernel updates stat in batch (> 32 pages) every time
PAGESIZES=$(($PAGESIZE * 33))
# Post 6.1 kernel updates stat in batch (> 64 pages) every time
if tst_kvcmp -lt "6.1"; then
PAGESIZES=$(($PAGESIZE * 33))
else
PAGESIZES=$(($PAGESIZE * 65))
fi

# On recent Linux kernels (at least v5.4) updating stats happens in batches
# (PAGESIZES) and also might depend on workload and number of CPUs. The kernel
Expand Down

0 comments on commit 2aaff45

Please sign in to comment.