]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
proc: test /proc/${pid}/statm
authorSwarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com>
Mon, 9 Oct 2023 11:07:14 +0000 (14:07 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 18 Oct 2023 21:43:22 +0000 (14:43 -0700)
commit6e79b375adb38219099d7e3ccc973a7808108a3e
tree6e01ab95e33ad0f3073ab8e02ce8c8a2134216da
parent598f0ac1500d7145c696de4d38797b1dd2c651de
proc: test /proc/${pid}/statm

My original comment lied, output can be "0 A A B 0 0 0\n"
(see comment in the code).

I don't quite understand why

get_mm_counter(mm, MM_FILEPAGES) + get_mm_counter(mm, MM_SHMEMPAGES)

can stay positive but get_mm_counter(mm, MM_ANONPAGES) is always 0 after
everything is unmapped but that's just me.

[adobriyan@gmail.com: more or less rewritten]
Link: https://lkml.kernel.org/r/0721ca69-7bb4-40aa-8d01-0c5f91e5f363@p183
Signed-off-by: Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/proc/proc-empty-vm.c