Re: [PATCH v6 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-29 Thread Johannes Weiner
for timescales below the polling interval, and peak memory > tracking at the cgroup level is otherwise perfect for this use-case. > > As this data is used to ensure that binpacked work ends up with > sufficient headroom, this use-case mostly avoids the inaccuracies > surrounding reclaimable memory. > > Suggested-by: Johannes Weiner > Suggested-by: Waiman Long > Signed-off-by: David Finkel Acked-by: Johannes Weiner

Re: [PATCH 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-24 Thread Johannes Weiner
On Tue, Jul 23, 2024 at 09:55:19PM -0400, Waiman Long wrote: > Could you use the "-v " option of git-format-patch to add a version > number to the patch title? Without that, it can be confusing as to > whether the patch is new or a resend of the previous one. +1 > > @@ -775,6 +775,11 @@ struct

Re: [PATCH 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-23 Thread Johannes Weiner
Hi David, thanks for pursuing this! A couple of comments below. On Mon, Jul 22, 2024 at 07:55:53PM -0400, David Finkel wrote: > @@ -1322,11 +1322,16 @@ PAGE_SIZE multiple when read back. > reclaim induced by memory.reclaim. > >memory.peak > - A read-only single value file which ex

Re: [PATCH] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-17 Thread Johannes Weiner
On Wed, Jul 17, 2024 at 04:14:07PM -0400, David Finkel wrote: > On Wed, Jul 17, 2024 at 1:04 PM Johannes Weiner wrote: > > > > On Tue, Jul 16, 2024 at 06:44:11AM -1000, Tejun Heo wrote: > > > Hello, > > > > > > On Tue, Jul 16, 2024 at 03:48:17PM +0200, Mi

Re: [PATCH] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-17 Thread Johannes Weiner
On Tue, Jul 16, 2024 at 06:44:11AM -1000, Tejun Heo wrote: > Hello, > > On Tue, Jul 16, 2024 at 03:48:17PM +0200, Michal Hocko wrote: > ... > > > This behavior is particularly useful for work scheduling systems that > > > need to track memory usage of worker processes/cgroups per-work-item. > > >

Re: [RFC PATCH v3 2/9] cgroup/pids: Separate semantics of pids.events related to pids.max

2024-04-09 Thread Johannes Weiner
On Mon, Apr 08, 2024 at 07:55:38AM -1000, Tejun Heo wrote: > Hello, > > On Fri, Apr 05, 2024 at 07:05:41PM +0200, Michal Koutný wrote: > > Currently, when pids.max limit is breached in the hierarchy, the event > > is counted and reported in the cgroup where the forking task resides. > > > > This

Re: [PATCH v8 1/6] list_lru: allows explicit memcg and NUMA node selection

2023-12-05 Thread Johannes Weiner
On Mon, Dec 04, 2023 at 04:30:44PM -0800, Chris Li wrote: > On Thu, Nov 30, 2023 at 12:35 PM Johannes Weiner wrote: > > > > On Thu, Nov 30, 2023 at 12:07:41PM -0800, Nhat Pham wrote: > > > On Thu, Nov 30, 2023 at 11:57 AM Matthew Wilcox > > > wrote: > > &g

Re: [PATCH v8 1/6] list_lru: allows explicit memcg and NUMA node selection

2023-11-30 Thread Johannes Weiner
On Thu, Nov 30, 2023 at 12:07:41PM -0800, Nhat Pham wrote: > On Thu, Nov 30, 2023 at 11:57 AM Matthew Wilcox wrote: > > > > On Thu, Nov 30, 2023 at 11:40:18AM -0800, Nhat Pham wrote: > > > This patch changes list_lru interface so that the caller must explicitly > > > specify numa node and memcg wh

Re: [PATCH v7 2/6] memcontrol: add a new function to traverse online-only memcg hierarchy

2023-11-29 Thread Johannes Weiner
On Wed, Nov 29, 2023 at 10:04:05AM -0500, Johannes Weiner wrote: > On Mon, Nov 27, 2023 at 03:45:56PM -0800, Nhat Pham wrote: > > The new zswap writeback scheme requires an online-only memcg hierarchy > > traversal. Add this functionality via the new mem_cgroup_iter_online() > &g

Re: [PATCH v7 6/6] zswap: shrinks zswap pool based on memory pressure

2023-11-29 Thread Johannes Weiner
inker_count() already factors protection into account, so sc->nr_to_scan should only be what is left on the list after excluding the protected area. Do we even get here if the whole list is protected? Is this to protect against concurrent shrinking of the list through multiple shrinkers or swapins? If so, a comment would be nice :) Otherwise, this looks great to me! Just nitpicks, no show stoppers: Acked-by: Johannes Weiner

Re: [PATCH v7 4/6] mm: memcg: add per-memcg zswap writeback stat

2023-11-29 Thread Johannes Weiner
On Mon, Nov 27, 2023 at 03:45:58PM -0800, Nhat Pham wrote: > From: Domenico Cerasuolo > > Since zswap now writes back pages from memcg-specific LRUs, we now need a > new stat to show writebacks count for each memcg. > > Suggested-by: Nhat Pham > Signed-off-by: Domenico Cerasuolo > Signed-off-b

Re: [PATCH v7 3/6] zswap: make shrinking memcg-aware

2023-11-29 Thread Johannes Weiner
NFIG_MEMCG. This needs a mem_cgroup_get() wrapper and a dummy function for no-memcg builds. With that fixed, though, everything else looks good to me: Acked-by: Johannes Weiner

Re: [PATCH v7 1/6] list_lru: allows explicit memcg and NUMA node selection

2023-11-29 Thread Johannes Weiner
which undoes a previous list_lru_isolate call. Unlike list_lru_add, it > does not increment the LRU node count (as list_lru_isolate does not > decrement the node count). list_lru_putback also allows for explicit > memcg and NUMA node selection. > > Suggested-by: Johannes Weiner > Signed-off-by: Nhat Pham Acked-by: Johannes Weiner