linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: akpm@linux-foundation.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	khlebnikov@openvz.org, kamezawa.hiroyu@jp.fujitsu.com,
	markus@trippelsdorf.de, oleg@redhat.com, stable@vger.kernel.org
Subject: Re: [patch 12/12] mm: correctly synchronize rss-counters at exit/exec
Date: Thu, 7 Jun 2012 22:28:17 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.00.1206072220200.1738@eggly.anvils> (raw)
In-Reply-To: <CA+55aFw7y5FBJm6pxiHHsoiPaVQG3A+4u6J9=4DGd8kVPjmzGQ@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1086 bytes --]

On Thu, 7 Jun 2012, Linus Torvalds wrote:
> No, this is apparently that same "almost there" patch from Oleg. I
> guarantee that it's wrong.
> 
>                 Linus
> 
> ---
> 
> [ This part, to be exact: ]
> 
> On Thu, Jun 7, 2012 at 6:16 PM, Hugh Dickins <hughd@google.com> wrote:
> > --- a/kernel/tsacct.c
> > +++ b/kernel/tsacct.c
> > @@ -91,6 +91,7 @@ void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
> >        stats->virtmem = p->acct_vm_mem1 * PAGE_SIZE / MB;
> >        mm = get_task_mm(p);
> >        if (mm) {
> > +               sync_mm_rss(mm);
> >                /* adjust to KB unit */
> >                stats->hiwater_rss   = get_mm_hiwater_rss(mm) * PAGE_SIZE / KB;
> >                stats->hiwater_vm    = get_mm_hiwater_vm(mm)  * PAGE_SIZE / KB;
> > --

Yup.

It does look as if Oleg's intent (last chance to update xacct stats
from dying current task) would be well served by changing that to

		if (p == current)
			sync_mm_rss(mm);

but I've made too many hurried decisions recently to sign off on that.

Hugh

  reply	other threads:[~2012-06-08  5:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120607212114.E4F5AA02F8@akpm.mtv.corp.google.com>
     [not found] ` <CA+55aFxOWR_h1vqRLAd_h5_woXjFBLyBHP--P8F7WsYrciXdmA@mail.gmail.com>
2012-06-08  0:25   ` Linus Torvalds
2012-06-08  1:05     ` Markus Trippelsdorf
2012-06-08  1:18       ` Linus Torvalds
2012-06-08 12:18         ` Oleg Nesterov
2012-06-11 10:25           ` Kamezawa Hiroyuki
2012-06-08  1:16     ` Hugh Dickins
2012-06-08  1:19       ` Linus Torvalds
2012-06-08  5:28         ` Hugh Dickins [this message]
2012-06-08 10:20       ` Konstantin Khlebnikov
2012-06-08 12:24         ` Oleg Nesterov
2012-06-08 13:29           ` Konstantin Khlebnikov
2012-06-08 17:01             ` Oleg Nesterov
2012-06-09  9:43               ` [PATCH] " Konstantin Khlebnikov

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=alpine.LSU.2.00.1206072220200.1738@eggly.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=khlebnikov@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=markus@trippelsdorf.de \
    --cc=oleg@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox