summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-09-28 14:28:15 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2019-10-09 23:03:34 +0200
commitf28b2baa6fc248672aa1475af578a60757dba410 (patch)
tree26efcc83bb671eccef0b3b7d2adea369a00465af
parentd611ecd9295eafa268b5a1390baabefcd5c980cd (diff)
backports: ckmake: Limit load to number of CPUs
Instead of limiting the maximum load to a fixed number limit it to the number of available CPUs. This should hopefully increase the speed as less task switches are needed. Also reduce the number of treads per build to half the number of available CPUs. Normally multiple builds are done in parallel anyway. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rwxr-xr-xdevel/ckmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/ckmake b/devel/ckmake
index d8c16773..d16de3a7 100755
--- a/devel/ckmake
+++ b/devel/ckmake
@@ -152,8 +152,8 @@ def process_kernel(num, kset, cmdline_args):
work_dir,
ignore=ignore_patterns('.tmp*', ".git"))
build = '%s/build/' % rel['full_path']
- jobs = '-j%d' % kset.build_jobs
- load = '-l%d' % 50
+ jobs = '-j%d' % (kset.build_jobs / 2)
+ load = '-l%d' % kset.build_jobs
make_args = ['KLIB=%s' % build,
'KLIB_BUILD=%s' % build]
nice = ['ionice', '-c', '3', 'nice', '-n', '20']