| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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
|
@corona10 @gpshead: Do you think that it would be worth it to document this special case in os.process_cpu_count()? "On Linux, if some CPUs are isolated, os.process_cpu_count() reports less usable CPUs than os.cpu_count()." Or is it a known fact? I'm asking if we should "advertize" more this function to users this way ;-) |
Sorry, something went wrong.
I think we can consider this "known" in the sense that the number of possible ways for this to be true on a system is more than we can accurately enumerate in our docs. |
Sorry, something went wrong.
|
Ok, thanks for the review @gpshead. |
Sorry, something went wrong.
…n#111689) 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
…n#111689) 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
| Back | FazBrowse Home | New Git URL |
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: