diff options
| author | William Lee Irwin III <wli@holomorphy.com> | 2004-08-26 20:36:03 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-26 20:36:03 -0700 |
| commit | 384aabda4b2051245ce44df0ecb538617644e32e (patch) | |
| tree | 4faaa83e21b0a9f960a902ace72884203cb2fbc4 /include | |
| parent | 64bb92dab0e34c1291eaf48abfbcb707d956cd99 (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 'include')
| -rw-r--r-- | include/linux/proc_fs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 2d439a8390c0..96a7db053781 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -86,10 +86,13 @@ extern struct proc_dir_entry *proc_root_kcore; extern void proc_root_init(void); extern void proc_misc_init(void); +struct mm_struct; + struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); struct dentry *proc_pid_unhash(struct task_struct *p); void proc_pid_flush(struct dentry *proc_dentry); int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); +unsigned long task_vsize(struct mm_struct *); extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, struct proc_dir_entry *parent); |
