lkml.org 
[lkml]   [2015]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] exit,stats: /* obey this comment */
On Thu, 23 Apr 2015 17:17:59 -0400 Rik van Riel <riel@redhat.com> wrote:

> 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.
>
> ...
>
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -711,10 +711,10 @@ void do_exit(long code)
> current->comm, task_pid_nr(current),
> preempt_count());
>
> - acct_update_integrals(tsk);
> /* sync mm's RSS info before statistics gathering */
> if (tsk->mm)
> sync_mm_rss(tsk->mm);
> + acct_update_integrals(tsk);
> group_dead = atomic_dec_and_test(&tsk->signal->live);
> if (group_dead) {
> hrtimer_cancel(&tsk->signal->real_timer);

I can't actually find anywhere where these counters are used in the
accounting code.

In fact the rss_stat counters don't get used for much at all, really -
non-essential stuff in the oom killer and a bit of procfs eyecandy.
What have I missed.

The patch makes sense from a defensive POV, but perhaps that
comment is misleading.


\
 
 \ /
  Last update: 2015-04-24 00:21    [W:0.042 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site