linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] mm/swapfile.c: select the swap device with default priority round robin
@ 2025-09-26 15:55 Baoquan He
  2025-09-26 15:55 ` [PATCH v2 1/1] " Baoquan He
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Baoquan He @ 2025-09-26 15:55 UTC (permalink / raw)
  To: linux-mm
  Cc: akpm, chrisl, kasong, youngjun.park, aaron.lu, baohua, shikemeng,
	nphamcs, Baoquan He

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.

Changelog:
v1->v2:
- Remove Documentation/admin-guide/mm/swap_numa.rst;
- Add back mistakenly removed lockdep_assert_held() line;
- Remove the unneeded code comment in _enable_swap_info().
  Thanks a lot for careful reviewing from Chris, YoungJun and Kairui.

Baoquan He (1):
  mm/swapfile.c: select the swap device with default priority round
    robin

 Documentation/admin-guide/mm/swap_numa.rst |  78 ---------------
 include/linux/swap.h                       |  11 +--
 mm/swapfile.c                              | 109 +++------------------
 3 files changed, 16 insertions(+), 182 deletions(-)
 delete mode 100644 Documentation/admin-guide/mm/swap_numa.rst

-- 
2.41.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-09-28  2:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-26 15:55 [PATCH v2 0/1] mm/swapfile.c: select the swap device with default priority round robin Baoquan He
2025-09-26 15:55 ` [PATCH v2 1/1] " Baoquan He
2025-09-27  7:56   ` kernel test robot
2025-09-27 17:14   ` kernel test robot
2025-09-28  2:22     ` Baoquan He
2025-09-26 16:02 ` [PATCH v2 0/1] " Baoquan He
2025-09-26 16:04   ` Baoquan He
2025-09-27  0:14 ` Baoquan He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox