BPF List
 help / color / mirror / Atom feed
From: Roman Gushchin <roman.gushchin@linux.dev>
To: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
	 Daniel Borkmann <daniel@iogearbox.net>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Andrii Nakryiko <andrii@kernel.org>
Subject: Re: [PATCH bpf-next v1 0/6] mm: bpf kfuncs to access memcg data
Date: Fri, 19 Dec 2025 11:40:32 -0800	[thread overview]
Message-ID: <87ike29s5r.fsf@linux.dev> (raw)
In-Reply-To: <20251219015750.23732-1-roman.gushchin@linux.dev> (Roman Gushchin's message of "Thu, 18 Dec 2025 17:57:44 -0800")

Roman Gushchin <roman.gushchin@linux.dev> writes:

I believe it can go through the bpf tree or the mm tree.

I'd slightly prefer the mm tree, simple because follow up bpf oom
patches have more changes on the mm side.

If Alexei, Daniel and Andrii is fine with it, Andrew, can you, please,
pick them up?

(bpf oom patches will follow likely next week)

Thank you!

> Introduce kfuncs to simplify the access to the memcg data.
> These kfuncs can be used to accelerate monitoring use cases and
> for implementing custom OOM policies once BPF OOM is landed.
>
> This patchset was separated out from the BPF OOM patchset to simplify
> the logistics and accelerate the landing of the part which is useful
> by itself. No functional changes since BPF OOM v2.
>
>
> JP Kobryn (2):
>   mm: introduce BPF kfunc to access memory events
>   bpf: selftests: selftests for memcg stat kfuncs
>
> Roman Gushchin (4):
>   mm: declare memcg_page_state_output() in memcontrol.h
>   mm: introduce BPF kfuncs to deal with memcg pointers
>   mm: introduce bpf_get_root_mem_cgroup() BPF kfunc
>   mm: introduce BPF kfuncs to access memcg statistics and events
>
>  include/linux/memcontrol.h                    |   3 +
>  mm/Makefile                                   |   3 +
>  mm/bpf_memcontrol.c                           | 175 ++++++++++++++
>  mm/memcontrol-v1.h                            |   1 -
>  .../testing/selftests/bpf/cgroup_iter_memcg.h |  18 ++
>  .../bpf/prog_tests/cgroup_iter_memcg.c        | 223 ++++++++++++++++++
>  .../selftests/bpf/progs/cgroup_iter_memcg.c   |  42 ++++
>  7 files changed, 464 insertions(+), 1 deletion(-)
>  create mode 100644 mm/bpf_memcontrol.c
>  create mode 100644 tools/testing/selftests/bpf/cgroup_iter_memcg.h
>  create mode 100644 tools/testing/selftests/bpf/prog_tests/cgroup_iter_memcg.c
>  create mode 100644 tools/testing/selftests/bpf/progs/cgroup_iter_memcg.c

  parent reply	other threads:[~2025-12-19 19:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19  1:57 [PATCH bpf-next v1 0/6] mm: bpf kfuncs to access memcg data Roman Gushchin
2025-12-19  1:57 ` [PATCH bpf-next v1 1/6] mm: declare memcg_page_state_output() in memcontrol.h Roman Gushchin
2025-12-19 21:35   ` Shakeel Butt
2025-12-19  1:57 ` [PATCH bpf-next v1 2/6] mm: introduce BPF kfuncs to deal with memcg pointers Roman Gushchin
2025-12-19 21:51   ` Shakeel Butt
2025-12-19 22:42     ` Roman Gushchin
2025-12-19  1:57 ` [PATCH bpf-next v1 3/6] mm: introduce bpf_get_root_mem_cgroup() BPF kfunc Roman Gushchin
2025-12-19 22:10   ` Shakeel Butt
2025-12-19  1:57 ` [PATCH bpf-next v1 4/6] mm: introduce BPF kfuncs to access memcg statistics and events Roman Gushchin
2025-12-19  2:15   ` bot+bpf-ci
2025-12-19  2:49     ` Roman Gushchin
2025-12-19 22:45   ` Shakeel Butt
2025-12-19  1:57 ` [PATCH bpf-next v1 5/6] mm: introduce BPF kfunc to access memory events Roman Gushchin
2025-12-19  2:21   ` bot+bpf-ci
2025-12-19  2:51     ` Roman Gushchin
2025-12-19 22:46   ` Shakeel Butt
2025-12-19  1:57 ` [PATCH bpf-next v1 6/6] bpf: selftests: selftests for memcg stat kfuncs Roman Gushchin
2025-12-19 23:07   ` Shakeel Butt
2025-12-20  3:20     ` Roman Gushchin
2025-12-19 19:40 ` Roman Gushchin [this message]
2025-12-20  3:25   ` [PATCH bpf-next v1 0/6] mm: bpf kfuncs to access memcg data Alexei Starovoitov
2025-12-20  3:27     ` Alexei Starovoitov
2025-12-20  3:36     ` Roman Gushchin

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=87ike29s5r.fsf@linux.dev \
    --to=roman.gushchin@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    /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