[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87af0c7a8fc35cd96519a4e3f09d39918bdb7370@linux.dev>
Date: Wed, 26 Nov 2025 03:05:32 +0000
From: hui.zhu@...ux.dev
To: "Michal Hocko" <mhocko@...e.com>
Cc: "Roman Gushchin" <roman.gushchin@...ux.dev>, "Andrew Morton"
<akpm@...ux-foundation.org>, "Johannes Weiner" <hannes@...xchg.org>,
"Shakeel Butt" <shakeel.butt@...ux.dev>, "Muchun Song"
<muchun.song@...ux.dev>, "Alexei Starovoitov" <ast@...nel.org>, "Daniel
Borkmann" <daniel@...earbox.net>, "Andrii Nakryiko" <andrii@...nel.org>,
"Martin KaFai Lau" <martin.lau@...ux.dev>, "Eduard Zingerman"
<eddyz87@...il.com>, "Song Liu" <song@...nel.org>, "Yonghong Song"
<yonghong.song@...ux.dev>, "John Fastabend" <john.fastabend@...il.com>,
"KP Singh" <kpsingh@...nel.org>, "Stanislav Fomichev" <sdf@...ichev.me>,
"Hao Luo" <haoluo@...gle.com>, "Jiri Olsa" <jolsa@...nel.org>, "Shuah
Khan" <shuah@...nel.org>, "Peter Zijlstra" <peterz@...radead.org>,
"Miguel Ojeda" <ojeda@...nel.org>, "Nathan Chancellor"
<nathan@...nel.org>, "Kees Cook" <kees@...nel.org>, "Tejun Heo"
<tj@...nel.org>, "Jeff Xu" <jeffxu@...omium.org>, mkoutny@...e.com, "Jan
Hendrik Farr" <kernel@...rr.cc>, "Christian Brauner"
<brauner@...nel.org>, "Randy Dunlap" <rdunlap@...radead.org>, "Brian
Gerst" <brgerst@...il.com>, "Masahiro Yamada" <masahiroy@...nel.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
cgroups@...r.kernel.org, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org, "Hui Zhu" <zhuhui@...inos.cn>
Subject: Re: [RFC PATCH 0/3] Memory Controller eBPF support
2025年11月25日 20:55, "Michal Hocko" <mhocko@...e.com mailto:mhocko@...e.com?to=%22Michal%20Hocko%22%20%3Cmhocko%40suse.com%3E > 写到:
>
> On Tue 25-11-25 12:39:11, hui.zhu@...ux.dev wrote:
>
> >
> > My goal is implement dynamic memory reclamation for memcgs without limits,
> > triggered by specific conditions.
> >
> > For instance, with memcg A and memcg B both unlimited, when memcg A faces
> > high PSI pressure, ebpf control memcg B do some memory reclaim work when
> > it try charge.
> >
> Understood. Please also think whether this is already possible with
> existing interfaces and if not what are roadblocks in that direction.
I think it's possible to implement a userspace program using the existing
PSI userspace interfaces and the control interfaces provided by memcg to
accomplish this task.
However, this approach has several limitations:
the entire process depends on the continuous execution of the userspace
program, response latency is higher, and we cannot perform fine-grained
operations on target memcg.
Now that Roman has provided PSI eBPF functionality at
https://lore.kernel.org/lkml/20251027231727.472628-1-roman.gushchin@linux.dev/
Maybe we could add eBPF support to memcg as well, allowing us to implement
the entire functionality directly in the kernel through eBPF.
Best,
Hui
>
> Thanks!
> --
> Michal Hocko
> SUSE Labs
>
Powered by blists - more mailing lists