Thread (20 messages) 20 messages, 7 authors, 2025-07-30

Re: [PATCH v3] memcg: expose socket memory pressure in a cgroup

From: Daniel Sedlak <hidden>
Date: 2025-07-23 08:58:19
Also in: cgroups, linux-mm

On 7/23/25 10:38 AM, Michal Koutný wrote:
On Tue, Jul 22, 2025 at 01:11:05PM -0700, Shakeel Butt [off-list ref] wrote:
quoted
quoted
quoted
1 second is the current implementation and it can be more if the memcg
remains in memory pressure. Regarding usefullness I think the periodic
stat collectors (like cadvisor or Google's internal borglet+rumbo) would
be interested in scraping this interface.
I think the cumulative counter suggested above is better at least.
It is tied to the underlying implementation. If we decide to use, for
example, PSI in future, what should this interface show?
Actually, if it was exposed as cummulative time under pressure (not
cummulative events), that's quite similar to PSI.
I think overall the cumulative counter is better than just signaling 1 
or 0, but it lacks the time information (if not scraped periodically). 
In addition, it may oscillate between under_pressure=true/false rather 
quickly so the cumulative counter would catch this.

To me, introducing the new PSI for sockets (like for CPU, IO, memory), 
would be slightly better than cumulative counter because PSI can have 
the timing information without frequent periodic scrapes. So it may help 
with live debugs.

However, if we were to just add a new counter to the memory.stat in each 
cgroup, then it would be easier to do so?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help