v1
2026-10-03
BPF struct_ops 扩展 memcg 策略 · v1
提出 memcg_ext 的 bpf_memcg_ops,让 BPF 按 cgroup 层级选择内存 charge 超限处理,避免 kernfs 通知持锁时同步 reclaim 卡住。
原始补丁链接
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
查看原始邮件 ↗
子 Patch(4)
1/4
bpf, cgroup: fix cgroup struct_ops query for a second attach type
[bpf, cgroup: fix cgroup struct_ops query for a second attach type] Two things in __cgroup_bpf_query() work only because CGROUP_TCP_SOCK_OPS is the only one struct_ops attach type. It calls cgroup_bp
2/4
memcg_ext: add cgroup-attached bpf_memcg_ops
[memcg_ext: add cgroup-attached bpf_memcg_ops] Add an empty bpf_memcg_ops type for attaching memory policies to cgroups. This is the first patch of memcg_ext, which makes memcg enforcement programmab
3/4
memcg_ext: allow BPF to defer memory.high enforcement
[memcg_ext: allow BPF to defer memory.high enforcement] Before it returns, try_charge_memcg() calls __mem_cgroup_handle_over_high(), which reclaims and can throttle the task. That happens wherever th
4/4
selftests/bpf: add a cgroupfs lock-holder bpf_memcg_ops sample
[selftests/bpf: add a cgroupfs lock-holder bpf_memcg_ops sample] A bpf_memcg_ops policy that keeps tasks holding a cgroupfs kernfs lock out of inline memory.high enforcement. About forty functions ta