aboutsummaryrefslogtreecommitdiffstats
path: root/mm
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 /mm
parent9683ede17eb15e7477659031b5eba076dccaf451 (diff)
downloadhistory-323d129f0446331f24302609dd0736c819f06bea.tar.gz
[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 'mm')
-rw-r--r--mm/mmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 0857b7ac2f034e..cac244415b6c71 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -729,6 +729,7 @@ none:
return NULL;
}
+#ifdef CONFIG_PROC_FS
void __vm_stat_account(struct mm_struct *mm, unsigned long flags,
struct file *file, long pages)
{
@@ -750,6 +751,7 @@ void __vm_stat_account(struct mm_struct *mm, unsigned long flags,
if (flags & VM_EXEC)
mm->exec_vm += pages;
}
+#endif /* CONFIG_PROC_FS */
/*
* The caller must hold down_write(current->mm->mmap_sem).