All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
	Michal Hocko <mhocko@suse.cz>
Subject: Re: [PATCH] exit,stats: /* obey this comment */
Date: Thu, 23 Apr 2015 20:21:22 -0400	[thread overview]
Message-ID: <55398C82.5000103@redhat.com> (raw)
In-Reply-To: <20150423144731.2c591c8eb70755b54ac83917@linux-foundation.org>

On 04/23/2015 05:47 PM, Andrew Morton wrote:
> 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.

Don't the get reported to userspace in things like this?

$ /usr/bin/time ls /dev
...
0.00user 0.00system 0:00.00elapsed 33%CPU (0avgtext+0avgdata
2652maxresident)k
0inputs+0outputs (0major+135minor)pagefaults 0swaps

Though admittedly this thing only reports maxresident...

I think there is some tool that reports the avg resident rss,
but I cannot remember what it is.

-- 
All rights reversed

      reply	other threads:[~2015-04-24  0:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 21:17 [PATCH] exit,stats: /* obey this comment */ Rik van Riel
2015-04-23 21:47 ` Andrew Morton
2015-04-24  0:21   ` Rik van Riel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55398C82.5000103@redhat.com \
    --to=riel@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=oleg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.