diff mbox series

[11/11] backports: ckmake: limit load to number of CPUs

Message ID 20191003155642.14909-12-hauke@hauke-m.de (mailing list archive)
State Accepted
Headers show
Series backports: Update to kernel 5.4-rc1 | expand

Commit Message

Hauke Mehrtens Oct. 3, 2019, 3:56 p.m. UTC
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>
---
 devel/ckmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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']