All of lore.kernel.org
 help / color / mirror / Atom feed
* [rfc 1/2] mm/hmm: Allow smaps to see zone device public pages
@ 2017-10-18  6:31 Balbir Singh
  2017-10-18  6:31 ` [rfc 2/2] smaps: Show zone device memory used Balbir Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Balbir Singh @ 2017-10-18  6:31 UTC (permalink / raw)
  To: jglisse; +Cc: linux-mm, mhocko, Balbir Singh

vm_normal_page() normally does not return zone device public
pages. In the absence of the visibility the output from smaps
is limited and confusing. It's hard to figure out where the
pages are. This patch uses _vm_normal_page() to expose them
for accounting

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
---
 fs/proc/task_mmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 5589b4bd4b85..9f1e2b2b5f5a 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -528,7 +528,7 @@ static void smaps_pte_entry(pte_t *pte, unsigned long addr,
 	struct page *page = NULL;
 
 	if (pte_present(*pte)) {
-		page = vm_normal_page(vma, addr, *pte);
+		page = _vm_normal_page(vma, addr, *pte, true);
 	} else if (is_swap_pte(*pte)) {
 		swp_entry_t swpent = pte_to_swp_entry(*pte);
 
@@ -708,7 +708,7 @@ static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask,
 	struct page *page = NULL;
 
 	if (pte_present(*pte)) {
-		page = vm_normal_page(vma, addr, *pte);
+		page = _vm_normal_page(vma, addr, *pte, true);
 	} else if (is_swap_pte(*pte)) {
 		swp_entry_t swpent = pte_to_swp_entry(*pte);
 
-- 
2.13.6

--
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>

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

end of thread, other threads:[~2017-10-23  9:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18  6:31 [rfc 1/2] mm/hmm: Allow smaps to see zone device public pages Balbir Singh
2017-10-18  6:31 ` [rfc 2/2] smaps: Show zone device memory used Balbir Singh
2017-10-18  7:10   ` Anshuman Khandual
2017-10-18 19:48     ` Balbir Singh
2017-10-19 17:02       ` Jerome Glisse
2017-10-21  1:23         ` Balbir Singh
2017-10-20 13:08   ` Michal Hocko
2017-10-20 21:55     ` Balbir Singh
2017-10-23  8:49       ` Michal Hocko
2017-10-23  9:32         ` Balbir Singh
2017-10-23  9:36           ` Michal Hocko
2017-10-23  9:37             ` Balbir Singh
2017-10-18  6:56 ` [rfc 1/2] mm/hmm: Allow smaps to see zone device public pages Anshuman Khandual
2017-10-18 19:36   ` Balbir Singh
2017-10-20 13:11 ` Michal Hocko
2017-10-20 21:52   ` Balbir Singh
2017-10-23  8:52     ` Michal Hocko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.