JDK-7003380 : active_processor_count() unaware of cpusets
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2010-11-30
  • Updated: 2011-02-16
  • Resolved: 2010-11-30
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
The VM does not use cpuset information on linux to determine the number of available processors.  This can result in a very inflated number of processors reported.  The active processor count is used a number of times in the VM internals.  It is also reported by Runtime.availableProcessors() which is used, among other places, by the fork/join framework.  I have worked on a patch that uses the cpuset information when available, and otherwise reverts back to the original method of detecting the number of processors.

JUSTIFICATION :
With the patch, Runtime.availableProcessors() reports 3968 on a SGI UV 1000 when the cpuset policy has restricted the process to 32 cores.  With the patch, it reports 32.