summaryrefslogtreecommitdiff
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2004-08-26 20:36:38 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-26 20:36:38 -0700
commit323d129f0446331f24302609dd0736c819f06bea (patch)
tree373ec3009063828e71c62522c41497577bbf5a48 /include/linux/mm.h
parent9683ede17eb15e7477659031b5eba076dccaf451 (diff)
[PATCH] speed up /proc/pid/statm for !CONFIG_PROC_FS
Remove the accounting overhead when CONFIG_PROC_FS is not defined. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8d61ba9895ab..7a47263511f0 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -752,7 +752,15 @@ extern struct page * follow_page(struct mm_struct *mm, unsigned long address,
int write);
extern int remap_page_range(struct vm_area_struct *vma, unsigned long from,
unsigned long to, unsigned long size, pgprot_t prot);
+
+#ifdef CONFIG_PROC_FS
void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
+#else
+static inline void __vm_stat_account(struct mm_struct *mm,
+ unsigned long flags, struct file *file, long pages)
+{
+}
+#endif /* CONFIG_PROC_FS */
static inline void vm_stat_account(struct vm_area_struct *vma)
{