• William Lee Irwin III's avatar
    [PATCH] O(1) proc_pid_statm() · 6ac0a8d7
    William Lee Irwin III authored
    Merely removing down_read(&mm->mmap_sem) from task_vsize() is too
    half-assed to let stand. The following patch removes the vma iteration
    as well as the down_read(&mm->mmap_sem) from both task_mem() and
    task_statm() and callers for the CONFIG_MMU=y case in favor of
    accounting the various stats reported at the times of vma creation,
    destruction, and modification. Unlike the 2.4.x patches of the same
    name, this has no per-pte-modification overhead whatsoever.
    
    This patch quashes end user complaints of top(1) being slow as well as
    kernel hacker complaints of per-pte accounting overhead simultaneously.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    6ac0a8d7
compat_exec.c 2.02 KB