diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-12-06 23:36:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:34 -0500 |
commit | 115085ea0794c0f339be8f9d25505c7f9861d824 (patch) | |
tree | 0b69f20ab8ab53702a4c94c11927e60fa058b509 /kernel/exit.c | |
parent | 128fb95650b3273a8dc9ba5514b6fe7db8ea30bf (diff) |
[PATCH] taskstats: cleanup do_exit() path
do_exit:
taskstats_exit_alloc()
...
taskstats_exit_send()
taskstats_exit_free()
I think this is not good, let it be a single function exported to the core
kernel, taskstats_exit(), which does alloc + send + free itself.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 06de6c4e8ca3..4e3f919edc48 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -850,9 +850,7 @@ static void exit_notify(struct task_struct *tsk) | |||
850 | fastcall NORET_TYPE void do_exit(long code) | 850 | fastcall NORET_TYPE void do_exit(long code) |
851 | { | 851 | { |
852 | struct task_struct *tsk = current; | 852 | struct task_struct *tsk = current; |
853 | struct taskstats *tidstats; | ||
854 | int group_dead; | 853 | int group_dead; |
855 | unsigned int mycpu; | ||
856 | 854 | ||
857 | profile_task_exit(tsk); | 855 | profile_task_exit(tsk); |
858 | 856 | ||
@@ -890,8 +888,6 @@ fastcall NORET_TYPE void do_exit(long code) | |||
890 | current->comm, current->pid, | 888 | current->comm, current->pid, |
891 | preempt_count()); | 889 | preempt_count()); |
892 | 890 | ||
893 | taskstats_exit_alloc(&tidstats, &mycpu); | ||
894 | |||
895 | acct_update_integrals(tsk); | 891 | acct_update_integrals(tsk); |
896 | if (tsk->mm) { | 892 | if (tsk->mm) { |
897 | update_hiwater_rss(tsk->mm); | 893 | update_hiwater_rss(tsk->mm); |
@@ -911,8 +907,8 @@ fastcall NORET_TYPE void do_exit(long code) | |||
911 | #endif | 907 | #endif |
912 | if (unlikely(tsk->audit_context)) | 908 | if (unlikely(tsk->audit_context)) |
913 | audit_free(tsk); | 909 | audit_free(tsk); |
914 | taskstats_exit_send(tsk, tidstats, group_dead, mycpu); | 910 | |
915 | taskstats_exit_free(tidstats); | 911 | taskstats_exit(tsk, group_dead); |
916 | 912 | ||
917 | exit_mm(tsk); | 913 | exit_mm(tsk); |
918 | 914 | ||