linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Finkel <davidf@vimeo.com>
To: Muchun Song <muchun.song@linux.dev>, Tejun Heo <tj@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: core-services@vimeo.com, Jonathan Corbet <corbet@lwn.net>,
	Michal Hocko <mhocko@kernel.org>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Shuah Khan <shuah@kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Zefan Li <lizefan.x@bytedance.com>,
	cgroups@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org
Subject: mm, memcg: cg2 memory{.swap,}.peak write handlers
Date: Mon, 22 Jul 2024 19:55:52 -0400	[thread overview]
Message-ID: <20240722235554.2911971-1-davidf@vimeo.com> (raw)

This is an updated patchset following some excellent comments from Roman
and Longman. [1]

As suggested, I've broken this into two commits:
 1) with the implementation changes
 2) extending the tests tests

I haven't been able to induce anything problematic, but I'm a bit
unclear as to whether there's reference counting on cgroups such that
we don't need to handle the case where the cgroup is freed before the
one of the peak files is closed.


 Documentation/admin-guide/cgroup-v2.rst          |  26 ++-
 include/linux/cgroup.h                           |   8 +
 include/linux/memcontrol.h                       |   5 +
 include/linux/page_counter.h                     |  11 +-
 kernel/cgroup/cgroup-internal.h                  |   2 +
 kernel/cgroup/cgroup.c                           |   7 +
 mm/memcontrol.c                                  | 129 +++++++++++++--
 mm/page_counter.c                                |  36 ++++-
 tools/testing/selftests/cgroup/cgroup_util.c     |  22 +++
 tools/testing/selftests/cgroup/cgroup_util.h     |   2 +
 tools/testing/selftests/cgroup/test_memcontrol.c | 227 ++++++++++++++++++++++++++-
 11 files changed, 444 insertions(+), 31 deletions(-)


[1]: https://lore.kernel.org/cgroups/20240722151713.2724855-1-davidf@vimeo.com/T/


Thank you for your efforts and reviews,

David Finkel
Senior Principal Software Engineer
Vimeo Inc.




             reply	other threads:[~2024-07-22 23:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-22 23:55 David Finkel [this message]
2024-07-22 23:55 ` [PATCH 1/2] " David Finkel
2024-07-23 14:29   ` Johannes Weiner
2024-07-23 19:45     ` David Finkel
2024-07-22 23:55 ` [PATCH 2/2] mm, memcg: cg2 memory{.swap,}.peak write tests David Finkel
2024-07-23 23:31 mm, memcg: cg2 memory{.swap,}.peak write handlers David Finkel

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=20240722235554.2911971-1-davidf@vimeo.com \
    --to=davidf@vimeo.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=core-services@vimeo.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan.x@bytedance.com \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=shuah@kernel.org \
    --cc=tj@kernel.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