diff options
| author | Prasanna Meda <pmeda@akamai.com> | 2005-01-04 05:28:28 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:28:28 -0800 |
| commit | fe52f9669c249f2bc9c44c541a83b0c18120cb0d (patch) | |
| tree | c699f3670e3e423d68ecac98fce315e1c3c3ea7c /include/linux | |
| parent | bb51bc5933d82005cf0625eaaaa16f7df1011ece (diff) | |
[PATCH] fork: total_forks not counted under tasklist_lock
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: Prasanna Meda <pmeda@akamai.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 848a48b1da8b..dfcb9bb20413 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -88,6 +88,7 @@ extern unsigned long avenrun[]; /* Load averages */ #define CT_TO_SECS(x) ((x) / HZ) #define CT_TO_USECS(x) (((x) % HZ) * 1000000/HZ) +extern unsigned long total_forks; extern int nr_threads; extern int last_pid; DECLARE_PER_CPU(unsigned long, process_counts); |
