[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <486bfabc-386c-4fdc-8903-d56ce207951f@cdn77.com>
Date: Thu, 24 Jul 2025 10:43:27 +0200
From: Daniel Sedlak <daniel.sedlak@...77.com>
To: Shakeel Butt <shakeel.butt@...ux.dev>
Cc: Michal Koutný <mkoutny@...e.com>,
Kuniyuki Iwashima <kuniyu@...gle.com>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Jonathan Corbet <corbet@....net>,
Neal Cardwell <ncardwell@...gle.com>, David Ahern <dsahern@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Yosry Ahmed <yosry.ahmed@...ux.dev>, linux-mm@...ck.org,
netdev@...r.kernel.org, Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>, Roman Gushchin <roman.gushchin@...ux.dev>,
Muchun Song <muchun.song@...ux.dev>, cgroups@...r.kernel.org,
Matyas Hurtik <matyas.hurtik@...77.com>
Subject: Re: [PATCH v3] memcg: expose socket memory pressure in a cgroup
On 7/23/25 7:54 PM, Shakeel Butt wrote:
>>
>> 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.
>
> How would this PSI for sockets work? What would be the entry and exit
> points?
>
Currently, we know the following information:
- we know when the pressure starts
- and we know when the pressure ends if not rearmed (start time + HZ)
From that, we should be able to calculate a similar triplet to the
pressure endpoints in the cgroups (cpu|io|memory|irq).pressure. That is,
how much % of time on average was spent under pressure for avg10, avg60,
avg300 i.e. average pressure over the past 10 seconds, 60 seconds, and
300 seconds, respectively. (+ total time spent under pressure)
For example, if we had pressure for 5 seconds straight, then the output
of socket.pressure could be:
full avg10=50.00 avg60=8.33 avg300=1.66 total=77777
Do you think this would be feasible? If so, I can try to send it as v4.
Thanks!
Daniel
Powered by blists - more mailing lists