linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Petr Cermak <petrcermak@chromium.org>,
	Primiano Tucci <primiano@chromium.org>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH v2 2/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS)
Date: Tue, 3 Feb 2015 12:16:32 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1502031213520.18250@chino.kir.corp.google.com> (raw)
In-Reply-To: <20150203155103.GB2644@blaptop>

On Wed, 4 Feb 2015, Minchan Kim wrote:

> > > This is a result of allowing something external (process B) be able to
> > > clear hwm so that you never knew the value went to 100MB.  That's the
> > > definition of a race, I don't know how to explain it any better and making
> > > any connection between clearing PG_referenced and mm->hiwater_rss is a
> > > stretch.  This approach just makes mm->hiwater_rss meaningless.
> > 
> > I understand your concern, but I hope you agree that the functionality we
> > are proposing would be very useful for profiling. Therefore, I suggest
> > adding an extra resettable field to /proc/pid/status (e.g.
> > resettable_hiwater_rss) instead. What is your view on this approach?
> 
> The idea would be very useful for measuring working set size for
> efficient memory management in userside, which becomes very popular
> with many platforms for embedded world with tight memory.
> 

The problem is the same as the aforementioned if you're only going to be 
adding one field.  If another process happens to clear the 
resettable_hiwater_rss before you can read it, you don't see potentially 
large spikes in size.

I understand the need for measuring working set size, and we have an 
in-house solution for that, but I don't think we should be introducing new 
fields that require only one root process on the system to be touching it 
for it to be effective.  Let me talk with some people about how difficult 
it would be to propose our in-house solution.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-02-03 20:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07 17:06 [PATCH v2 0/2] " Petr Cermak
2015-01-07 17:06 ` [PATCH v2 1/2] task_mmu: Reduce excessive indentation in clear_refs_write Petr Cermak
2015-01-07 17:06 ` [PATCH v2 2/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS) Petr Cermak
2015-01-07 17:24   ` Kirill A. Shutemov
2015-01-14 15:22     ` Petr Cermak
2015-01-14 23:36       ` Kirill A. Shutemov
2015-01-21 22:58         ` David Rientjes
2015-01-22  0:22           ` Primiano Tucci
2015-01-22 23:27             ` David Rientjes
2015-01-23  0:28               ` Primiano Tucci
2015-01-27  0:00                 ` David Rientjes
2015-02-03  3:26                   ` Petr Cermak
2015-02-03 15:51                     ` Minchan Kim
2015-02-03 20:16                       ` David Rientjes [this message]
2015-01-14 23:39       ` Kirill A. Shutemov
2015-01-15 16:46         ` Petr Cermak

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.DEB.2.10.1502031213520.18250@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=hughd@google.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=petrcermak@chromium.org \
    --cc=primiano@chromium.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