Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eBPF] Reducing CPU consumption for process events exec/exit #6201

Draft
wants to merge 1 commit into
base: v6.4
Choose a base branch
from

Conversation

yinjiping
Copy link
Contributor

Replace sched_process_fork with sys_exit_fork and sys_exit_clone tracepoints because sched_process_fork cannot distinguish between processes and threads, leading to excessive threads being pushed to the upper layer unnecessarily. sys_exit_fork and sys_exit_clone only push process information.

Use spin locks to protect the process event list instead of thread mutex locks to avoid frequent context switches.

This PR is for:

  • Agent

Affected branches

  • main
  • v6.4

@yinjiping yinjiping marked this pull request as draft April 23, 2024 02:59
Replace `sched_process_fork` with `sys_exit_fork` and `sys_exit_clone` tracepoints because sched_process_fork cannot distinguish between processes and threads, leading to excessive threads being pushed to the upper layer unnecessarily. `sys_exit_fork` and `sys_exit_clone` only push process information.

Use spin locks to protect the process event list instead of thread mutex locks to avoid frequent context switches.
@yinjiping
Copy link
Contributor Author

存在风险,暂时先不合并

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant