• William Lee Irwin III's avatar
    [PATCH] task_vsize() locking cleanup · 384aabda
    William Lee Irwin III authored
    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: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    384aabda
array.c 10.4 KB