[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1508889368-14489-1-git-send-email-prakash.sangappa@oracle.com>
Date: Tue, 24 Oct 2017 16:56:08 -0700
From: Prakash Sangappa <prakash.sangappa@...cle.com>
To: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc: akpm@...ux-foundation.org, mhocko@...e.com, minchan@...nel.org,
rientjes@...gle.com, dancol@...gle.com, prakash.sangappa@...cle.com
Subject: [PATCH] Hugetlb pages rss accounting is incorrect in /proc/<pid>/smaps
Resident set size(Rss) accounting of hugetlb pages is not done
currently in /proc/<pid>/smaps. The pmap command reads rss from
this file and so it shows Rss to be 0 in pmap -x output for
hugetlb mapped vmas. This patch fixes it.
Signed-off-by: Prakash Sangappa <prakash.sangappa@...cle.com>
---
fs/proc/task_mmu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 5589b4b..c7e1048 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -724,6 +724,7 @@ static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask,
mss->shared_hugetlb += huge_page_size(hstate_vma(vma));
else
mss->private_hugetlb += huge_page_size(hstate_vma(vma));
+ mss->resident += huge_page_size(hstate_vma(vma));
}
return 0;
}
--
2.7.4
Powered by blists - more mailing lists