On 09/26/25 at 11:55pm, Baoquan He wrote: > The detailed information about patch can be found in patch log. Here I > would like to add testing related information. > > On my system, it has 8 nodes, 64G RAM. So I created 4 zram devices of > size 16G. Doing this because I can't find system with 4 free SSD disk > which can be used as swap devices. And nowadays, swap, zram become more > and more popular, even default setup, so I create zram to test patch. > # free -h > total used free shared buff/cache available > Mem: 62Gi 1.6Gi 61Gi 4.8Mi 276Mi 61Gi > Swap: 63Gi 0B 63Gi > > 1) create zram > #My fedora will add one zram0 by default, I reset it because the zram size if not enough > swapoff /dev/zram0 > > cd /sys/block/ > echo 1 > zram0/reset > cat /sys/class/zram-control/hot_add > cat /sys/class/zram-control/hot_add > cat /sys/class/zram-control/hot_add > > echo 16G > zram0/disksize > echo 16G > zram1/disksize > echo 16G > zram2/disksize > echo 16G > zram3/disksize > > mkswap /dev/zram0 > mkswap /dev/zram1 > mkswap /dev/zram2 > mkswap /dev/zram3 > > swapon /dev/zram0 > swapon /dev/zram1 > swapon /dev/zram2 > swapon /dev/zram3 > > 2) Create memcg with 4G (this avoids noise from other anon process in system) > cd /sys/fs/cgroup/ > mkdir testing > echo 4G > testing/memory.max > echo 3G > testing/memory.high > > 3) Run usemem in memcg > cgexec -g memory:testing ~/vm-scalability/usemem --init-time -O -y -x -n 31 2G > ~/vm-scalability/temp.txt > > The usemem output is not easy to understand, I will attach my draft > script in thread for easing result collecting and statistics. 1) Yon can fetch usemem from here: https://kernel.googlesource.com/pub/scm/linux/kernel/git/wfg/vm-scalability 2) In attachments, usemem-calc.sh is used to analyze raw data from usemem output, then output an unstandable result. You can copy below commands to run ten times or how many times you want on usemem. for i in {1..10}; do cgexec -g memory:testing ~/vm-scalability/usemem --init-time -O -y -x -n 31 2G > ~/vm-scalability/temp.txt ~/usemem-calc.sh ~/vm-scalability/temp.txt echo "The $i""th time to run usemem" done 3) Please keep all the output of usemem-calc.sh to a file, then use result.sh to get an average value. Any unclear part, please feel free to ask me privately or publicly in thread. Thanks Baoquan