Re: [PATCH bpf-next 2/2] samples/bpf: Add memcg async reclaim example

From: Alexei Starovoitov

Date: Thu Sep 24 2026 - 01:35:59 EST


On Thu, Sep 24, 2026 at 12:04 PM Hui Zhu <hui.zhu@xxxxxxxxx> wrote:
> Add an example of BPF-driven async proactive reclaim, keeping the
> complex monitoring scenario out of the selftests. A BPF program arms a
> bpf_wq/timer chain that watches the workingset refaults (file and anon)
> of a monitor cgroup; when they grow past a threshold, a round of
> bpf_proactive_reclaim() batches reclaims a target cgroup, re-arming the
> work queue until the round budget is spent.
[...]
> samples/bpf/memcg_async_reclaim.bpf.c | 349 ++++++++
> samples/bpf/memcg_async_reclaim.h | 39 +
> samples/bpf/memcg_async_reclaim_user.c | 1141 ++++++++++++++++++++++++
> 5 files changed, 1539 insertions(+), 1 deletion(-)

No. We're not adding new samples to samples/bpf.
1200 lines were overkill as a selftest. 1500 lines as a sample
are not better.
samples/bpf/ are dead. We do not add new things there.

pw-bot: cr