From: Jan S. <jst...@re...> - 2011-11-03 13:46:11
|
This test relies on getting correct rss number out of memory.stat. Very rarely it fails and finds bigger number than expected, for example: memcg_function_test 6 TFAIL : rss=8192/4096 My assumption is that extra page is faulted in as result of need for another stack page. Documentation describes it as: "rss - # of bytes of anonymous and swap cache memory." This includes also stack pages. I intentionally modified memcg_process' sigusr handler to grab few extra stack pages, to confirm, that these indeed contribute to this number. This patch adds a 'warmup' before actual test. The point is to exercise the whole code path, so that any page fault, which is unrelated to actual test occurs before process is moved to target cgroup. What happens now is: spawn process [NEW] signal it with SIGUSR1 (alloc) [NEW] signal it with SIGUSR1 (free) move it to cgroup signal it with SIGUSR1 (alloc) check rss in memory.stat signal it with SIGUSR1 (free) optionally check rss in memory.stat Signed-off-by: Jan Stancek <jst...@re...> --- .../memcg/functional/memcg_function_test.sh | 43 ++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) |