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

Message ID 20191003155642.14909-12-hauke@hauke-m.de
State New
Headers show
Series
  • backports: Update to kernel 5.4-rc1
Related show

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(-)

Patch
diff mbox series

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