Skip to content

Conversation

@janaknat
Copy link
Contributor

num_cpus does not return the total number of CPUs if aperf is taskset. Use sysconf to get the total number of online CPUs.

compare.tar.gz

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

num_cpus does not return the total number of CPUs if aperf is taskset.
Use sysconf to get the total number of online CPUs.
@janaknat janaknat requested a review from a team as a code owner May 30, 2024 20:47
@wash-amzn
Copy link
Contributor

Do you have a reproducible example of this problem? I never ran into it.

@wash-amzn
Copy link
Contributor

The bigger problem to solve here is the report of failures when the set of disabled CPUs isn't contiguous and at the end of the CPU list.

@janaknat
Copy link
Contributor Author

janaknat commented Jun 3, 2024

Do you have a reproducible example of this problem? I never ran into it.

Run aperf with taskset. Ex: taskset 1 ./aperf record. The perf stat values are limited to only one CPU.

@wash-amzn
Copy link
Contributor

Do you have a reproducible example of this problem? I never ran into it.

Run aperf with taskset. Ex: taskset 1 ./aperf record. The perf stat values are limited to only one CPU.

That is not my experience. I was doing many runs with taskset and aperf recorded all CPUs normally.

@janaknat janaknat merged commit 49b553b into main Jun 3, 2024
@janaknat janaknat deleted the num-cpus-remove branch June 20, 2024 21:07
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