]> git.hungrycats.org Git - linux/commit
[PATCH] task_vsize() locking cleanup
authorWilliam Lee Irwin III <wli@holomorphy.com>
Fri, 27 Aug 2004 03:36:03 +0000 (20:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 27 Aug 2004 03:36:03 +0000 (20:36 -0700)
commit384aabda4b2051245ce44df0ecb538617644e32e
tree4faaa83e21b0a9f960a902ace72884203cb2fbc4
parent64bb92dab0e34c1291eaf48abfbcb707d956cd99
[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>
fs/proc/array.c
fs/proc/task_nommu.c
include/linux/proc_fs.h