From: Prakash Sangappa <prakash.sangappa@oracle.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: akpm@linux-foundation.org, mhocko@suse.com, minchan@kernel.org,
rientjes@google.com, dancol@google.com,
prakash.sangappa@oracle.com
Subject: [PATCH] Hugetlb pages rss accounting is incorrect in /proc/<pid>/smaps
Date: Tue, 24 Oct 2017 16:56:08 -0700 [thread overview]
Message-ID: <1508889368-14489-1-git-send-email-prakash.sangappa@oracle.com> (raw)
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@oracle.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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2017-10-24 23:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 23:56 Prakash Sangappa [this message]
2017-10-25 6:55 ` Michal Hocko
2017-10-25 22:45 ` Naoya Horiguchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508889368-14489-1-git-send-email-prakash.sangappa@oracle.com \
--to=prakash.sangappa@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dancol@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox