Commit 43fa2b9
committed
tools/power turbostat: Fix forked child affinity regression
JIRA: https://issues.redhat.com/browse/RHEL-77986
commit b32c369
Author: Len Brown <len.brown@intel.com>
Date: Mon Jan 27 16:42:19 2025 -0600
tools/power turbostat: Fix forked child affinity regression
In "one-shot" mode, turbostat
1. takes a counter snapshot
2. forks and waits for a child
3. takes the end counter snapshot and prints the result.
But turbostat counter snapshots currently use affinity to travel
around the system so that counter reads are "local", and this
affinity must be cleared between #1 and #2 above.
The offending commit removed that reset that allowed the child
to run on cpu_present_set.
Fix that issue, and improve upon the original by using
cpu_possible_set for the child. This allows the child
to also run on CPUs that hotplug online during its runtime.
Reported-by: Zhang Rui <rui.zhang@intel.com>
Fixes: 7bb3fe2 ("tools/power/turbostat: Obey allowed CPUs during startup")
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Steve Best <sbest@redhat.com>1 parent b26085c commit 43fa2b9
1 file changed
+52
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1120 | 1120 | | |
1121 | 1121 | | |
1122 | 1122 | | |
1123 | | - | |
1124 | | - | |
| 1123 | + | |
| 1124 | + | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
| |||
8488 | 8488 | | |
8489 | 8489 | | |
8490 | 8490 | | |
| 8491 | + | |
| 8492 | + | |
| 8493 | + | |
| 8494 | + | |
| 8495 | + | |
| 8496 | + | |
| 8497 | + | |
| 8498 | + | |
| 8499 | + | |
| 8500 | + | |
| 8501 | + | |
| 8502 | + | |
| 8503 | + | |
| 8504 | + | |
| 8505 | + | |
| 8506 | + | |
| 8507 | + | |
| 8508 | + | |
| 8509 | + | |
| 8510 | + | |
| 8511 | + | |
| 8512 | + | |
| 8513 | + | |
| 8514 | + | |
| 8515 | + | |
| 8516 | + | |
| 8517 | + | |
8491 | 8518 | | |
8492 | 8519 | | |
8493 | 8520 | | |
| |||
8519 | 8546 | | |
8520 | 8547 | | |
8521 | 8548 | | |
| 8549 | + | |
| 8550 | + | |
| 8551 | + | |
| 8552 | + | |
| 8553 | + | |
| 8554 | + | |
| 8555 | + | |
| 8556 | + | |
| 8557 | + | |
| 8558 | + | |
8522 | 8559 | | |
8523 | 8560 | | |
8524 | 8561 | | |
| |||
9371 | 9408 | | |
9372 | 9409 | | |
9373 | 9410 | | |
| 9411 | + | |
| 9412 | + | |
| 9413 | + | |
| 9414 | + | |
| 9415 | + | |
| 9416 | + | |
| 9417 | + | |
| 9418 | + | |
| 9419 | + | |
| 9420 | + | |
| 9421 | + | |
| 9422 | + | |
9374 | 9423 | | |
9375 | 9424 | | |
9376 | 9425 | | |
| |||
9386 | 9435 | | |
9387 | 9436 | | |
9388 | 9437 | | |
| 9438 | + | |
9389 | 9439 | | |
9390 | 9440 | | |
9391 | 9441 | | |
| |||
0 commit comments