* [PATCH v2 -mmotm-2009-12-10-17-19] Fix wrong rss count of smaps
@ 2010-01-04 1:23 Minchan Kim
2010-01-04 3:13 ` KOSAKI Motohiro
0 siblings, 1 reply; 2+ messages in thread
From: Minchan Kim @ 2010-01-04 1:23 UTC (permalink / raw)
To: Andrew Morton
Cc: Hugh Dickins, Matt Mackall, KAMEZAWA Hiroyuki, linux-mm, lkml
Long time ago, We regards zero page as file_rss and
vm_normal_page didn't return NULL in case of zero page
But now, we reinstated ZERO_PAGE and vm_normal_page's implementation
can return NULL in case of zero page.
Then, RSS and PSS can't be matched in smaps_pte_range.
This patch fixes it.
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Matt Mackall <mpm@selenic.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
fs/proc/task_mmu.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 47c03f4..f277c4a 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -361,12 +361,11 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
if (!pte_present(ptent))
continue;
- mss->resident += PAGE_SIZE;
-
page = vm_normal_page(vma, addr, ptent);
if (!page)
continue;
+ mss->resident += PAGE_SIZE;
/* Accumulate the size in pages that have been accessed. */
if (pte_young(ptent) || PageReferenced(page))
mss->referenced += PAGE_SIZE;
--
1.5.6.3
--
Kind regards,
Minchan Kim
--
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] 2+ messages in thread
* Re: [PATCH v2 -mmotm-2009-12-10-17-19] Fix wrong rss count of smaps
2010-01-04 1:23 [PATCH v2 -mmotm-2009-12-10-17-19] Fix wrong rss count of smaps Minchan Kim
@ 2010-01-04 3:13 ` KOSAKI Motohiro
0 siblings, 0 replies; 2+ messages in thread
From: KOSAKI Motohiro @ 2010-01-04 3:13 UTC (permalink / raw)
To: Minchan Kim
Cc: kosaki.motohiro, Andrew Morton, Hugh Dickins, Matt Mackall,
KAMEZAWA Hiroyuki, linux-mm, lkml
>
> Long time ago, We regards zero page as file_rss and
> vm_normal_page didn't return NULL in case of zero page
>
> But now, we reinstated ZERO_PAGE and vm_normal_page's implementation
> can return NULL in case of zero page.
>
> Then, RSS and PSS can't be matched in smaps_pte_range.
> This patch fixes it.
>
> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> Acked-by: Matt Mackall <mpm@selenic.com>
> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
--
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 [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-04 3:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-04 1:23 [PATCH v2 -mmotm-2009-12-10-17-19] Fix wrong rss count of smaps Minchan Kim
2010-01-04 3:13 ` KOSAKI Motohiro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).