• Prasanna Meda's avatar
    [PATCH] fork: total_forks not counted under tasklist_lock · fe52f966
    Prasanna Meda authored
    Bring the total_forks under tasklist_lock.  When most of the fork code
    icluding nr_threads is moved to copy_process() from do_fork() code in 2.6,
    this is left out.
    
    Althought accuracy of total_forks is not important, it would be nice to add
    this.  It does not involve additional cost, and the code will be cleaner if
    it is grouped with nr_threads.  The difference is, total_forks will
    increase on fork, but nr_threads will increase on fork and decrease on the
    exit.
    
    I also moved extern decleration to sched.h from proc_misc.c.
    Signed-off-by: default avatarPrasanna Meda <pmeda@akamai.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    fe52f966
proc_misc.c 15.9 KB