Skip to content

Conversation

@multics69
Copy link
Contributor

Since ftrace has a lower overhead than tracepoint, use ftrace for futex tracing whenever possible. If any functions for futex tracing are not available (e.g., due to function inlining), fall back to using tracepoints.

Changwoo Min added 2 commits July 1, 2025 13:23
Add two utility functions -- compat::cond_kprobes_enable() and
compat::cond_tracepoints_enable(), which conditionally load multiple
kprobes/tracepoints in a all-or-nothing manner. If any provided symbols
do not exist, these functions will fail.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
Since ftrace has a lower overhead than tracepoint, use ftrace for futex
tracing whenever possible. If any functions for futex tracing are not
available (e.g., due to function inlining), fall back to using tracepoints.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
@multics69 multics69 requested review from arighi, hodgesds and htejun July 1, 2025 07:00
Copy link
Contributor

@arighi arighi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have some numbers? I thought ftrace was more expensive than tracepoints, due to the ftrace handler calls...

If you have numbers and this improves performance, then LGTM.

@multics69
Copy link
Contributor Author

Do you have some numbers? I thought ftrace was more expensive than tracepoints, due to the ftrace handler calls...

If you have numbers and this improves performance, then LGTM.

Tracepoint is slower since it copies the arguments to the struct.

@multics69 multics69 added this pull request to the merge queue Jul 1, 2025
Merged via the queue into sched-ext:main with commit f575d62 Jul 1, 2025
17 checks passed
@multics69 multics69 deleted the lavd-tp-btf branch July 1, 2025 17:34
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.

2 participants