[llvm] r256291 - lit: Limit number of processes on Windows to 32.
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 22 15:12:00 PST 2015
Author: nico
Date: Tue Dec 22 17:12:00 2015
New Revision: 256291
URL: http://llvm.org/viewvc/llvm-project?rev=256291&view=rev
Log:
lit: Limit number of processes on Windows to 32.
Modified:
llvm/trunk/utils/lit/lit/util.py
Modified: llvm/trunk/utils/lit/lit/util.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/util.py?rev=256291&r1=256290&r2=256291&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/util.py (original)
+++ llvm/trunk/utils/lit/lit/util.py Tue Dec 22 17:12:00 2015
@@ -39,7 +39,9 @@ def detectCPUs():
if "NUMBER_OF_PROCESSORS" in os.environ:
ncpus = int(os.environ["NUMBER_OF_PROCESSORS"])
if ncpus > 0:
- return ncpus
+ # With more than 32 processes, process creation often fails with
+ # "Too many open files". FIXME: Check if there's a better fix.
+ return min(ncpus, 32)
return 1 # Default
def mkdir_p(path):
More information about the llvm-commits
mailing list