Skip to contentSkip to conversation

oe-layer-setup.sh: restore number of threads to max

PATCH In review Ryan Eatmon 2 participants 3 messages Sep 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oe-layer-setup.sh: restore number of threads to max

We are no longer using VMs for building and so should not need to reduce the number of threads down by 75%.

---
 oe-layertool-setup.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
oe-layertool-setup.sh +2 -3
index e404290..1ea31c3 100755
@@ -770,9 +770,8 @@ EOM
 
     # set the number of threads
     threads=`cat /proc/cpuinfo | grep -c processor`
-    tnum=`expr \( ${threads} + 1 \) \* 75 / 100`
-    sed -i "s/^PARALLEL_MAKE.*/PARALLEL_MAKE ?= \"-j ${tnum}\"/" $confdir/local.conf
-    sed -i "s/^BB_NUMBER_THREADS.*/BB_NUMBER_THREADS ?= \"${tnum}\"/" $confdir/local.conf
+    sed -i "s/^PARALLEL_MAKE.*/PARALLEL_MAKE ?= \"-j ${threads}\"/" $confdir/local.conf
+    sed -i "s/^BB_NUMBER_THREADS.*/BB_NUMBER_THREADS ?= \"${threads}\"/" $confdir/local.conf
 
     # Find if old DL_DIR was set
     if [ -e $confdir/local.conf.bak ]
Signature · 1 line
2.17.1
#1 lore raw
Quoted 2 lines · Ryan Eatmon via lists.yoctoproject.org

We are no longer using VMs for building and so should not need to reduce the number of threads down by 75%.

I would recommend dropping those lines altogether - these days bitbake defaults to max number of threads/processes on its own.

Quoted 23 lines
---
 oe-layertool-setup.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
oe-layertool-setup.sh +2 -3
index e404290..1ea31c3 100755
@@ -770,9 +770,8 @@ EOM
 
     # set the number of threads
     threads=`cat /proc/cpuinfo | grep -c processor`
-    tnum=`expr \( ${threads} + 1 \) \* 75 / 100`
-    sed -i "s/^PARALLEL_MAKE.*/PARALLEL_MAKE ?= \"-j ${tnum}\"/" $confdir/local.conf
-    sed -i "s/^BB_NUMBER_THREADS.*/BB_NUMBER_THREADS ?= \"${tnum}\"/" $confdir/local.conf
+    sed -i "s/^PARALLEL_MAKE.*/PARALLEL_MAKE ?= \"-j ${threads}\"/" $confdir/local.conf
+    sed -i "s/^BB_NUMBER_THREADS.*/BB_NUMBER_THREADS ?= \"${threads}\"/" $confdir/local.conf
 
     # Find if old DL_DIR was set
     if [ -e $confdir/local.conf.bak ]
Signature · 1 line
2.17.1
#2 lore raw
Quoted 6 lines · Denys Dmytriyenko
Quoted 2 lines · Ryan Eatmon via lists.yoctoproject.org

We are no longer using VMs for building and so should not need to reduce the number of threads down by 75%.

I would recommend dropping those lines altogether - these days bitbake defaults to max number of threads/processes on its own.

Even better. I'll make that change.

Quoted 23 lines
Quoted 23 lines
---
  oe-layertool-setup.sh | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
oe-layertool-setup.sh +2 -3
index e404290..1ea31c3 100755
@@ -770,9 +770,8 @@ EOM
 
      # set the number of threads
      threads=`cat /proc/cpuinfo | grep -c processor`
-    tnum=`expr \( ${threads} + 1 \) \* 75 / 100`
-    sed -i "s/^PARALLEL_MAKE.*/PARALLEL_MAKE ?= \"-j ${tnum}\"/" $confdir/local.conf
-    sed -i "s/^BB_NUMBER_THREADS.*/BB_NUMBER_THREADS ?= \"${tnum}\"/" $confdir/local.conf
+    sed -i "s/^PARALLEL_MAKE.*/PARALLEL_MAKE ?= \"-j ${threads}\"/" $confdir/local.conf
+    sed -i "s/^BB_NUMBER_THREADS.*/BB_NUMBER_THREADS ?= \"${threads}\"/" $confdir/local.conf
 
      # Find if old DL_DIR was set
      if [ -e $confdir/local.conf.bak ]
Signature · 1 line
2.17.1
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS