linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Colascione <dancol@google.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] Synchronize task mm counters on context switch
Date: Fri, 23 Feb 2018 08:34:19 -0800	[thread overview]
Message-ID: <CAKOZueurwrSZWbKKUTx+LOSKEWFnfMYbarDc++pEKHD3xyQbmA@mail.gmail.com> (raw)
In-Reply-To: <20180223081147.GD30773@dhcp22.suse.cz>

On Fri, Feb 23, 2018 at 12:11 AM, Michal Hocko <mhocko@kernel.org> wrote:
> On Wed 21-02-18 18:49:35, Daniel Colascione wrote:
> [...]
>> For more context: on Android, we've historically scanned each processes's
>> address space using /proc/pid/smaps (and /proc/pid/smaps_rollup more
>> recently) to extract memory management statistics. We're looking at
>> replacing this mechanism with the new /proc/pid/status per-memory-type
>> (e.g., anonymous, file-backed) counters so that we can be even more
>> efficient, but we'd like the counts we collect to be accurate.
>
> If you need the accuracy then why don't you simply make
> SPLIT_RSS_COUNTING configurable and disable it in your setup?

I considered that option, but it feels like a last resort. I think
agreement between /proc/pid/status and /proc/pid/smaps is a
correctness issue, and I'd prefer to fix the correctness issue
globally.

That said, *deleting* the SPLIT_RSS_COUNTING code would be nice and
simple. How sure are we that the per-task accounting is really needed?
Maybe I'm wrong, but I feel like taking page faults will touch per-mm
data structures anyway, so one additional atomic update on the mm
shouldn't hurt all that much.

--
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:[~2018-02-23 16:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-05 22:03 [PATCH] Synchronize task mm counters on context switch Daniel Colascione
2018-02-21 19:05 ` Daniel Colascione
2018-02-22  0:16   ` Minchan Kim
2018-02-22  0:23     ` Daniel Colascione
2018-02-22  2:06       ` Minchan Kim
2018-02-22  2:46         ` [PATCH] Synchronize task mm counters on demand Daniel Colascione
2018-02-23  2:01           ` Minchan Kim
2018-02-23  2:09             ` Daniel Colascione
2018-02-23  2:24               ` Daniel Colascione
2018-02-23  2:28               ` Minchan Kim
2018-02-23  2:43                 ` Daniel Colascione
2018-02-23  3:12                   ` Minchan Kim
2018-02-23  9:50           ` f66871fb4c: WARNING:inconsistent_lock_state kernel test robot
2018-02-22  2:49         ` [PATCH] Synchronize task mm counters on context switch Daniel Colascione
2018-02-23  8:11           ` Michal Hocko
2018-02-23 16:34             ` Daniel Colascione [this message]
2018-02-23 17:50               ` Michal Hocko
2018-02-23 18:47                 ` Daniel Colascione
2018-02-27 10:02                   ` Michal Hocko
2018-02-22  9:40         ` Peter Zijlstra
2018-02-22 13:06           ` Minchan Kim
2018-02-22 16:23           ` Daniel Colascione

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=CAKOZueurwrSZWbKKUTx+LOSKEWFnfMYbarDc++pEKHD3xyQbmA@mail.gmail.com \
    --to=dancol@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).