From 202d962bf93c043e7f4d50fe4f9ac77691ee4812 Mon Sep 17 00:00:00 2001 From: Matt Mackall Date: Tue, 6 Jan 2009 12:06:05 +0000 Subject: [PATCH] This patch series introduces /proc/pid/pagemap and /proc/kpagemap, which allow detailed run-time examination of process memory usage at a page granularity. The first several patches whip the page-walking code introduced for /proc/pid/smaps and clear_refs into a more generic form, the next couple make those interfaces optional, and the last two introduce the new interfaces, also optional. This respin adds simple, expandable headers to both pagemap and kpagemap as suggested by Nikita. I haven't moved pagewalk.c from lib/ to mm/ as suggested by Nick as I still think lib is a better fit for its automatic conditional linking. This patch: Uninline some functions in the page walker Signed-off-by: Matt Mackall Cc: Jeremy Fitzhardinge Cc: David Rientjes Signed-off-by: Andrew Morton --- fs/proc/task_mmu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- fs/proc/task_mmu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 6f470972..5691dfee 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -308,7 +308,7 @@ static void clear_refs_pte_range(struct vm_area_struct *vma, pmd_t *pmd, cond_resched(); } -static inline void walk_pmd_range(struct pmd_walker *walker, pud_t *pud, +static void walk_pmd_range(struct pmd_walker *walker, pud_t *pud, unsigned long addr, unsigned long end) { pmd_t *pmd; @@ -323,7 +323,7 @@ static inline void walk_pmd_range(struct pmd_walker *walker, pud_t *pud, } } -static inline void walk_pud_range(struct pmd_walker *walker, pgd_t *pgd, +static void walk_pud_range(struct pmd_walker *walker, pgd_t *pgd, unsigned long addr, unsigned long end) { pud_t *pud; @@ -347,11 +347,11 @@ static inline void walk_pud_range(struct pmd_walker *walker, pgd_t *pgd, * Recursively walk the page table for the memory area in a VMA, calling * a callback for every bottom-level (PTE) page table. */ -static inline void walk_page_range(struct vm_area_struct *vma, - void (*action)(struct vm_area_struct *, - pmd_t *, unsigned long, - unsigned long, void *), - void *private) +static void walk_page_range(struct vm_area_struct *vma, + void (*action)(struct vm_area_struct *, + pmd_t *, unsigned long, + unsigned long, void *), + void *private) { unsigned long addr = vma->vm_start; unsigned long end = vma->vm_end; -- 2.39.5