optimize(bpf): Delete tgid_pname_map
Background
tgid_pname_map 只是用在 cookie_pid_map update 失败时的 fallback:
- cookie_pid_map update 失败是少见的情况,在正常场景下不需维护 tgid_pname_map。
- 就算是 cookie_pid_map update 失败,先
_update_map_elem_by_cookie()里 tgid_pname_map[pid] = val 再在上层函数update_map_elem_by_cookie()里读 tgid_pname_map[pid] 也是多此一举,一个指针传递就行了,无需用 map。
这个 PR 直接删去了 cookie_pid_map 同时维持了 fallback 逻辑,减小了内核内存消耗,整整 8192 * (4 + 16) = 163840 bytes = 0.16384 Mb 呢!同时省去了 wan 代理时对每个 socket 的一次 map 操作,提升全局性能。
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 #[issue number]
Test Result
求更新
求更新
[!NOTE] The following content has been translated from its original language using an automated process powered by a proprietary API. Segments originally written in English have been preserved, while non-English portions have been machine-translated for readability. Please be aware that minor inaccuracies may exist due to the automated nature of the translation.
Requesting an update.
更新啥 没人review 😢
更新啥 没人review 😢
[!NOTE] The following content has been translated from its original language using an automated process powered by a proprietary API. Segments originally written in English have been preserved, while non-English portions have been machine-translated for readability. Please be aware that minor inaccuracies may exist due to the automated nature of the translation.
Update what? No one reviews 😢