瀏覽代碼

exit,stats: /* obey this comment */

There is a helpful comment in do_exit() that states we sync the mm's RSS
info before statistics gathering.

The function that does the statistics gathering is called right above that
comment.

Change the code to obey the comment.

Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rik van Riel 10 年之前
父節點
當前提交
51229b4953
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/exit.c

+ 1 - 1
kernel/exit.c

@@ -711,10 +711,10 @@ void do_exit(long code)
 			current->comm, task_pid_nr(current),
 			current->comm, task_pid_nr(current),
 			preempt_count());
 			preempt_count());
 
 
-	acct_update_integrals(tsk);
 	/* sync mm's RSS info before statistics gathering */
 	/* sync mm's RSS info before statistics gathering */
 	if (tsk->mm)
 	if (tsk->mm)
 		sync_mm_rss(tsk->mm);
 		sync_mm_rss(tsk->mm);
+	acct_update_integrals(tsk);
 	group_dead = atomic_dec_and_test(&tsk->signal->live);
 	group_dead = atomic_dec_and_test(&tsk->signal->live);
 	if (group_dead) {
 	if (group_dead) {
 		hrtimer_cancel(&tsk->signal->real_timer);
 		hrtimer_cancel(&tsk->signal->real_timer);