linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* mm, memcg: cg2 memory{.swap,}.peak write handlers
@ 2024-07-22 23:55 David Finkel
  2024-07-22 23:55 ` [PATCH 1/2] " David Finkel
  2024-07-22 23:55 ` [PATCH 2/2] mm, memcg: cg2 memory{.swap,}.peak write tests David Finkel
  0 siblings, 2 replies; 6+ messages in thread
From: David Finkel @ 2024-07-22 23:55 UTC (permalink / raw)
  To: Muchun Song, Tejun Heo, Roman Gushchin, Andrew Morton
  Cc: core-services, Jonathan Corbet, Michal Hocko, Shakeel Butt,
	Shuah Khan, Johannes Weiner, Zefan Li, cgroups, linux-doc,
	linux-mm, linux-kselftest

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.




^ permalink raw reply	[flat|nested] 6+ messages in thread
* mm, memcg: cg2 memory{.swap,}.peak write handlers
@ 2024-07-23 23:31 David Finkel
  0 siblings, 0 replies; 6+ messages in thread
From: David Finkel @ 2024-07-23 23:31 UTC (permalink / raw)
  To: Muchun Song, Tejun Heo, Roman Gushchin, Andrew Morton
  Cc: core-services, Jonathan Corbet, Michal Hocko, Shakeel Butt,
	Shuah Khan, Johannes Weiner, Zefan Li, cgroups, linux-doc,
	linux-mm, linux-kselftest

This is an update of a previous series[1] addressing Johannes' comments,
and rebasing on top of linus's master.

Unfortunately, linus's master doesn't seem to be bootable at the
moment, so I haven't re-run the tests on this change yet. I'll see about
re-running everything in the morning. (root= resolution seems to be
failing both for x86-64 (in qemu) and usermode linux)

 Documentation/admin-guide/cgroup-v2.rst          |  26 ++--
 include/linux/cgroup-defs.h                      |   5 +
 include/linux/cgroup.h                           |   3 +
 include/linux/memcontrol.h                       |   5 +
 include/linux/page_counter.h                     |   6 +-
 kernel/cgroup/cgroup-internal.h                  |   2 +
 kernel/cgroup/cgroup.c                           |   7 ++
 mm/memcontrol.c                                  | 117 ++++++++++++++++--
 mm/page_counter.c                                |  30 +++--
 tools/testing/selftests/cgroup/cgroup_util.c     |  22 ++++
 tools/testing/selftests/cgroup/cgroup_util.h     |   2 +
 tools/testing/selftests/cgroup/test_memcontrol.c | 226 ++++++++++++++++++++++++++++++++--
 12 files changed, 416 insertions(+), 35 deletions(-)


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


Thanks for all the constructive comments and discussion!

David Finkel
Senior Principal Engineer, Core Services
Vimeo Inc.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-23 23:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-22 23:55 mm, memcg: cg2 memory{.swap,}.peak write handlers David Finkel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox