summaryrefslogtreecommitdiff
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2004-08-26 20:36:03 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-26 20:36:03 -0700
commit384aabda4b2051245ce44df0ecb538617644e32e (patch)
tree4faaa83e21b0a9f960a902ace72884203cb2fbc4 /fs/proc/array.c
parent64bb92dab0e34c1291eaf48abfbcb707d956cd99 (diff)
[PATCH] task_vsize() locking cleanup
task_vsize() doesn't need mm->mmap_sem for the CONFIG_MMU case; the semaphore doesn't prevent mm->total_vm from going stale or getting inconsistent with other numbers regardless. Also, KSTK_EIP() and KSTK_ESP() don't want or need protection from mm->mmap_sem either. So this pushes mm->mmap_sem to task_vsize() in the CONFIG_MMU=n task_vsize(). Also, hoist the prototype of task_vsize() into proc_fs.h The net result of this is a small speedup of procps for CONFIG_MMU. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index d41a679d1362..f2c9d22f773e 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -299,7 +299,6 @@ int proc_pid_status(struct task_struct *task, char * buffer)
return buffer - orig;
}
-extern unsigned long task_vsize(struct mm_struct *);
int proc_pid_stat(struct task_struct *task, char * buffer)
{
unsigned long vsize, eip, esp, wchan;
@@ -318,11 +317,9 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
vsize = eip = esp = 0;
mm = get_task_mm(task);
if (mm) {
- down_read(&mm->mmap_sem);
vsize = task_vsize(mm);
eip = KSTK_EIP(task);
esp = KSTK_ESP(task);
- up_read(&mm->mmap_sem);
}
get_task_comm(tcomm, task);