ltp
ltp copied to clipboard
controllers/cpuset_memory_spread:
When the cpuset_mem_hog program is run and the number of FilePages in the process is counted, the Page Cache of other processes interferes with the process, causing the use case to fail Other Page Cache comes from two aspects:
- After releasing Page Cache and slab cache: echo 3> /proc/sys/vm/drop_caches, some processes or kernel threads will reload files into Page Cache
- During the running of the cpuset_mem_hog program, there will be some processes using Page Cache
amendment: 1, The first type of Page Cache: solve it by adding a delay after the echo 3> /proc/sys/vm/drop_caches command is executed: sleep 3 # 3 is an empirical value, and it may have a different value without the environment 2, The second type of Page Cache: by modifying the strategy, create a new sys: /dev/cpuset/cpuset/sys under the cpuset in the cgroup, and then add all user processes except cpuset_mem_hog to the cgroup, and set the strategy for the CPU and memory nodes Same as /dev/cpuset/cpuset/1
Hi, thanks for the PR. There are some issues which I will comment on the code.
@guohui0712 @richiejp I encountered the same problem, when I adjusted the lowerlimit from 2000 to 5000, the problem disappeared. I think the reason of the FAIL case is random events (minimal probability) and get_memsinfo(before send SIGUSR1) and account_ meminfo (after read FIFO). So I think we can just increase the lowerlimit.