dae
dae copied to clipboard
optimize(bpf): Don't attach cgroup bpf when no pname routing + nonzero so_mark_from_dae
Background
按照 #817 的讨论,在不需要 pid/pname 监控的场景下不执行 cgroup bpf。
注意 reload 无法切换两种模式,因为 reload 不 re-load bpf,无法重新注入 so_mark_from_dae。
预计能提升 wan 场景下全系统性能损耗,毕竟之前 root cgroup 都要监控,还要 per-packet 处理 task_struct->mm->arg_starg 都是不小的 overhead。
Checklist
- [ ] The Pull Request has been fully tested
- [ ] There's an entry in the CHANGELOGS
- [ ] There is a user-facing docs PR against https://github.com/daeuniverse/dae
Full Changelogs
- [Implement ...]
Issue Reference
Closes #817
Test Result
没问题