ltp
ltp copied to clipboard
memcg: calculate these values dynamically based on the machine size
Tip from @Werkov for tests in testcases/kernel/controllers/memcg/ which are based on test_memcontrol.c from kselftests.
Kselftest test tools/testing/selftests/cgroup/test_memcontrol.c got a tip on https://lore.kernel.org/linux-kselftest/[email protected]/:
Ideally we want to calculate these values dynamically based on the machine size (number of cpus and total memory size).
We can calculate the memcg error margin and scale memcg sizes if necessarily. It's the only way to make it pass both on a 2-CPU's vm and 512-CPU's physical server.
@wangli5665 FYI