Commit 244e37b
authored
When CPUs are isolated on Linux, os.process_cpu_count() is smaller
than os.cpu_count(). Fix the test for this case.
Example with "isolcpus=5,11 rcu_nocbs=5,11" options passed to a Linux
command line to isolated two logical CPUs:
$ ./python -c 'import os; print(os.process_cpu_count(), "/", os.cpu_count())'
10 / 12
1 parent f21b230 commit 244e37b
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4342 | 4342 | | |
4343 | 4343 | | |
4344 | 4344 | | |
4345 | | - | |
4346 | | - | |
| 4345 | + | |
| 4346 | + | |
4347 | 4347 | | |
4348 | 4348 | | |
4349 | 4349 | | |
| |||
4356 | 4356 | | |
4357 | 4357 | | |
4358 | 4358 | | |
4359 | | - | |
4360 | | - | |
| 4359 | + | |
| 4360 | + | |
4361 | 4361 | | |
4362 | 4362 | | |
4363 | 4363 | | |
| |||
0 commit comments