Description of problem: 两个问题: 1.4.19 x86 上脏内存回收后,memory.dirty_throttle_latency中没有记录,全为0 2.4.19 arm以及5.10 x86/arm上,不存在/sys/fs/cgroup/memory/memory.dirty_throttle_latency文件,请确认是否需要支持 Version-Release number of selected component (if applicable): # uname -a Linux i22e11410.eu95sqa 4.19.91-231.git.533d40934.an8.x86_64 #1 SMP Mon Feb 14 13:30:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux [root@i22e11410 bin]# cat /etc/os-release NAME="Anolis OS" VERSION="8.2" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="8.2" PLATFORM_ID="platform:an8" PRETTY_NAME="Anolis OS 8.2" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" How reproducible: # show dirty throttle latency for memcg in memory.dirty_throttle_latency. # Test process: # 1)trigger memory dirty throttle in memcg; # in memcg, run process to write memory bigger than parent-memcg's # memory.limit_in_bytes to disk. # 2)check if sum of child's dirty throttle lat for memcg is less than # or equal to their parent. Steps to Reproduce: 1.setup memcg_mnt=`grep -w memory /proc/mounts | cut -f 2 | cut -d " " -f2` [ ! -d "$memcg_mnt" ] && mkdir -p $memcg_mnt && mount -t cgroup -o memory cgroup $memcg_mnt head -c 20000M /dev/zero > ~/10g testpath=$memcg_mnt/foo mkdir -p $testpath/sub # parent memcg's mem limit: 5M memlimit_p=5242880 # child memcg's mem limit: 20M memlimit_c=20971520 echo $memlimit_p > "$testpath/memory.limit_in_bytes" echo $memlimit_c > "$testpath/sub/memory.limit_in_bytes" sync echo 3 > "/proc/sys/vm/drop_caches" path_c=$testpath/sub/memory.dirty_throttle_latency path_p=$testpath/memory.dirty_throttle_latency # clear all lat info echo 0 > ${path_c} echo 0 > ${path_p} 2.# in memcg, run process to write 1000MB memory to disk, # which is bigger than parent-memcg's memory.limit_in_bytes(50MB). # that would cause dirty throttle in curent memcg. echo $$ > $testpath/sub/tasks head -c 2000M ~/10g > /dev/null head -c 1000M /dev/zero > ~/10g sleep 1 echo $$ > $memcg_mnt/tasks 3. # check if sum of child's dirty throttle lat for memcgis less than or equal to their parent # and the value can not be all zero cat $path_c cat $path_p Actual results: 1.4.19 x86 上脏内存回收后,memory.dirty_throttle_latency中没有记录,全为0 2.4.19 arm以及5.10 x86/arm上,不存在/sys/fs/cgroup/memory/memory.dirty_throttle_latency文件,请确认是否需要支持 cat /sys/fs/cgroup/memory/foo/sub/memory.dirty_throttle_latency 0-1ms: 0 1-5ms: 0 5-10ms: 0 10-100ms: 0 100-500ms: 0 500-1000ms: 0 >=1000ms: 0 total(ms): 0 cat /sys/fs/cgroup/memory/foo/memory.dirty_throttle_latency 0-1ms: 0 1-5ms: 0 5-10ms: 0 10-100ms: 0 100-500ms: 0 500-1000ms: 0 >=1000ms: 0 total(ms): 0 Expected results: 1.sum of child's dirty throttle lat for memcg is less than or equal to their parent 2.the value can not be all zero Additional info:
更正下 两个问题: 1.4.19 x86/arm 上脏内存回收后,memory.dirty_throttle_latency中没有记录,全为0 2.5.10 x86/arm上,不存在/sys/fs/cgroup/memory/memory.dirty_throttle_latency文件,请确认是否需要支持