linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Sedlak <daniel.sedlak@cdn77.com>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: "Michal Koutný" <mkoutny@suse.com>,
	"Kuniyuki Iwashima" <kuniyu@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Neal Cardwell" <ncardwell@google.com>,
	"David Ahern" <dsahern@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Yosry Ahmed" <yosry.ahmed@linux.dev>,
	linux-mm@kvack.org, netdev@vger.kernel.org,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Hocko" <mhocko@kernel.org>,
	"Roman Gushchin" <roman.gushchin@linux.dev>,
	"Muchun Song" <muchun.song@linux.dev>,
	cgroups@vger.kernel.org,
	"Matyas Hurtik" <matyas.hurtik@cdn77.com>
Subject: Re: [PATCH v3] memcg: expose socket memory pressure in a cgroup
Date: Thu, 24 Jul 2025 10:43:27 +0200	[thread overview]
Message-ID: <486bfabc-386c-4fdc-8903-d56ce207951f@cdn77.com> (raw)
In-Reply-To: <irvyenjca4czrxfew4c7nc23luo5ybgdw3lquq7aoadmhmfu6h@h4mx532ls26h>

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


  reply	other threads:[~2025-07-24  8:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22  7:11 [PATCH v3] memcg: expose socket memory pressure in a cgroup Daniel Sedlak
2025-07-22  7:17 ` Eric Dumazet
2025-07-22  7:27   ` Daniel Sedlak
2025-07-22  8:57 ` Michal Koutný
2025-07-22 17:50   ` Shakeel Butt
2025-07-22 18:27     ` Kuniyuki Iwashima
2025-07-22 18:41       ` Waiman Long
2025-07-22 18:49         ` Kuniyuki Iwashima
2025-07-22 19:05       ` Shakeel Butt
2025-07-22 19:58         ` Kuniyuki Iwashima
2025-07-22 20:11           ` Shakeel Butt
2025-07-22 22:10             ` Kuniyuki Iwashima
2025-07-23  8:38             ` Michal Koutný
2025-07-23  8:58               ` Daniel Sedlak
2025-07-23 17:54                 ` Shakeel Butt
2025-07-24  8:43                   ` Daniel Sedlak [this message]
2025-07-25  0:44                     ` Tejun Heo
2025-07-28 11:29                       ` Daniel Sedlak
2025-07-30  0:15                         ` Tejun Heo
2025-07-23  8:41         ` Daniel Sedlak

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=486bfabc-386c-4fdc-8903-d56ce207951f@cdn77.com \
    --to=daniel.sedlak@cdn77.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-mm@kvack.org \
    --cc=matyas.hurtik@cdn77.com \
    --cc=mhocko@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=yosry.ahmed@linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).