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

linux_perf_event fails on aarch64 since exclude_idle is set #2298

Open
bhalevy opened this issue Jun 18, 2024 · 0 comments · May be fixed by #2295
Open

linux_perf_event fails on aarch64 since exclude_idle is set #2298

bhalevy opened this issue Jun 18, 2024 · 0 comments · May be fixed by #2295

Comments

@bhalevy
Copy link
Member

bhalevy commented Jun 18, 2024

As seen in scylladb/scylladb#19227 (comment)
exclude_idle is not supported on ARM platforms causing the perf_event_open system call to fail.

The documentation in https://man7.org/linux/man-pages/man2/perf_event_open.2.html says:

       EPERM  Returned on many (but not all) architectures when an
              unsupported exclude_hv, exclude_idle, exclude_user, or
              exclude_kernel setting is specified.

FWIW, although this applies to several bitfields in the linux perf_event_attr, we've only seen an issue now with exclude_idle on arm.

bhalevy added a commit to bhalevy/seastar that referenced this issue Jun 18, 2024
Commit 93f19d3
added `exclude_idle = 1` to `linux_perf_event`.
However, as reported in
scylladb/scylladb#19227 (comment),
`exclude_idle` is not supported on ARM platforms.

This change sets `exclude_idle` only on known-to-work architectures
(presently, it's only x86_64), assuming it is initialized to 0 as all
other unset bitfields in `perf_event_attr`.

Fixes scylladb#2298

Signed-off-by: Benny Halevy <[email protected]>
@bhalevy bhalevy linked a pull request Jun 18, 2024 that will close this issue
bhalevy added a commit to bhalevy/seastar that referenced this issue Jul 1, 2024
Commit 93f19d3
added `exclude_idle = 1` to `linux_perf_event`.
However, as reported in
scylladb/scylladb#19227 (comment),
`exclude_idle` is not supported on ARM platforms.

This change sets `exclude_idle` only on known-to-work architectures
(presently, it's only x86_64), assuming it is initialized to 0 as all
other unset bitfields in `perf_event_attr`.

Fixes scylladb#2298

Signed-off-by: Benny Halevy <[email protected]>
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 a pull request may close this issue.

1 participant