linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: Shakeel Butt <shakeelb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] memcg: unify memcg stat flushing
Date: Wed, 13 Oct 2021 20:01:22 +0200	[thread overview]
Message-ID: <20211013180122.GA1007@blackbody.suse.cz> (raw)
In-Reply-To: <20211001190040.48086-2-shakeelb@google.com>

Hello Shakeel.

(Sorry for taking so long getting down to this.)

On Fri, Oct 01, 2021 at 12:00:40PM -0700, Shakeel Butt <shakeelb@google.com> wrote:
> There is no need for that.  We just need one flusher and everyone else
> can benefit.

I imagine a cgroup with an intricate deep hiearchy with many updates and
a separate (simpler) sibling/independent cgroup that would need to pay
the costs of the first hierarchy updates [1] when it asks just for its
own stats (bound by the amount that's leftover from the periodic
updates).

The stats files (or wb stats) are likely not that time sensitive and the
reclaim (that can be local only but is slow path anyway) already uses
the global flushing.

I wonder whether the bigger benefit would be to retain the global
stats_flush_threshold counter but flush only local subtree.

Thanks,
Michal

[1] At first I thought non-memcg updates would interfere too via rstat
tree but I see it's actually filtered with the stats_flush_threshold so
only foreign memcg updates are relevant.

  reply	other threads:[~2021-10-13 18:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 19:00 [PATCH v2 1/2] memcg: flush stats only if updated Shakeel Butt
2021-10-01 19:00 ` [PATCH v2 2/2] memcg: unify memcg stat flushing Shakeel Butt
2021-10-13 18:01   ` Michal Koutný [this message]
2021-10-13 19:24     ` Shakeel Butt
2021-10-14  9:04       ` Michal Koutný
2021-10-13 18:01 ` [PATCH v2 1/2] memcg: flush stats only if updated Michal Koutný
2021-10-14 16:31   ` Shakeel Butt
2021-10-15 17:55     ` Michal Koutný
2021-11-04 21:27     ` Andrew Morton
2021-11-04 22:09       ` Shakeel Butt

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=20211013180122.GA1007@blackbody.suse.cz \
    --to=mkoutny@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=shakeelb@google.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 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).