Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "ps/vm" commands to display correct memory usage
Kernel commit eca56ff906bd ("mm, shmem: add internal shmem resident memory accounting") added shmem resident memory accounting and it's tallied up into the mm_rss_stat counter. As a result, the "ps/vm" commands miss the shmem pages count and fail to show correct memory usage when a process uses an anonymous shared memory region. Without the patch: crash> ps 2150 PID PPID CPU TASK ST %MEM VSZ RSS COMM 2150 2105 14 ffff8fba86d74d40 IN 0.0 10488392 444 mmap_test ^^^ Let's count the shmem pages together with regular files and anonymous pages. With the patch: crash> ps 2150 PID PPID CPU TASK ST %MEM VSZ RSS COMM 2150 2105 14 ffff8fba86d74d40 IN 20.8 10488392 3659008 mmap_test Reported-by: Buland Kumar Singh <bsingh@redhat.com> Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
- Loading branch information
Showing
3 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters