summaryrefslogtreecommitdiff
path: root/tools/genboardscfg.py
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2022-01-11 18:34:50 +0300
committerSimon Glass <sjg@chromium.org>2022-01-13 19:13:41 +0300
commit5ecdd529ae38fecd35bfc41869058802c804a01e (patch)
treefa7ab13cd84c2d5c482c097ecbb9b480a91457f5 /tools/genboardscfg.py
parent880dbc5f808b65f62b47c78939e12d32c1701ed6 (diff)
downloadu-boot-5ecdd529ae38fecd35bfc41869058802c804a01e.tar.xz
genboardscfg: limit to 240 jobs
When genboardscfg.py is run on machines with 255 or more cores, the process will consume more than 1024 file descriptors, which is a common standard ulimit for user processes. As a consequence it will fail with a lenghty Python trace, with the almost hidden message: OSError: [Errno 24] Too many open files It's somewhat questionable whether that level of parallelity is actually useful for genboardscfg, so we limit the *default* number of jobs to the safe number of 240, to avoid the problem. If a user persists, she can still force a higher number via the -j parameter - hopefully having raised the ulimit accordingly beforehand. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/genboardscfg.py')
-rwxr-xr-xtools/genboardscfg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
index 4ee7aa1f89..07bf681d1d 100755
--- a/tools/genboardscfg.py
+++ b/tools/genboardscfg.py
@@ -430,7 +430,7 @@ def main():
# Add options here
parser.add_option('-f', '--force', action="store_true", default=False,
help='regenerate the output even if it is new')
- parser.add_option('-j', '--jobs', type='int', default=cpu_count,
+ parser.add_option('-j', '--jobs', type='int', default=min(cpu_count, 240),
help='the number of jobs to run simultaneously')
parser.add_option('-o', '--output', default=OUTPUT_FILE,
help='output file [default=%s]' % OUTPUT_FILE)