Skip to contentSkip to conversation

doc: Explain dynamic calculation of BB_NUMBER_THREADS

PATCH In review Robert P. J. Day 2 participants 2 messages Feb 7, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: Explain dynamic calculation of BB_NUMBER_THREADS

While it's useful for the reader to know about BB_NUMBER_THREADS, make it clear that that value will be calculated automatically by default.

---

doc/bitbake-user-manual/bitbake-user-manual-execution.xml +11 -1
index 46dafeee..f22ab36e 100644
@@ -53,6 +53,15 @@
                 A possibly simpler solution is that some Linux distributions
                 (e.g. Debian and Ubuntu) provide the <filename>ncpus</filename> command.
             </para>
+
+	    <para>
+		If you don't explicitly set this variable, OpenEmbedded
+		will do it for you via the default <filename>bitbake.conf</filename>
+		file by running an OE-supplied utility routine:
+		<literallayout class='monospaced'>
+     BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+		</literallayout>
+	    </para>
         </note>
     </para>
 
@@ -569,7 +578,8 @@
 
         <para>
             It is worth noting that you can greatly speed up the build time by properly setting
-            the <filename>BB_NUMBER_THREADS</filename> variable.
+            the <filename>BB_NUMBER_THREADS</filename> variable although, if you don't,
+	    its value will be determined dynamically by an OpenEmbedded utility routine.
         </para>
 
         <para>

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday

========================================================================

#1 lore raw
Quoted 38 lines

-----Original Message-----
From: [email protected] <bitbake-devel- [email protected]> On Behalf Of Robert P. J. Day
Sent: den 7 februari 2020 10:52
To: BitBake developer list <[email protected]>
Subject: [bitbake-devel] [PATCH] doc: Explain dynamic calculation of BB_NUMBER_THREADS

While it's useful for the reader to know about BB_NUMBER_THREADS, make it clear that that value will be calculated automatically by default.

---

doc/bitbake-user-manual/bitbake-user-manual-execution.xml +9 -0
index 46dafeee..f22ab36e 100644
@@ -53,6 +53,15 @@
                 A possibly simpler solution is that some Linux distributions
                 (e.g. Debian and Ubuntu) provide the <filename>ncpus</filename> command.
             </para>
+
+	    <para>
+		If you don't explicitly set this variable, OpenEmbedded
+		will do it for you via the default <filename>bitbake.conf</filename>
+		file by running an OE-supplied utility routine:
+		<literallayout class='monospaced'>
+     BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+		</literallayout>
+	    </para>
         </note>
     </para>
 
@@ -569,7 +578,8 @@
 

doc/bitbake-user-manual/bitbake-user-manual-execution.xml

Quoted 10 lines
doc/bitbake-user-manual/bitbake-user-manual-execution.xml +2 -2
         <para>
             It is worth noting that you can greatly speed up the build time by properly setting
-            the <filename>BB_NUMBER_THREADS</filename> variable.
+            the <filename>BB_NUMBER_THREADS</filename> variable although, if you don't,
+	    its value will be determined dynamically by an OpenEmbedded utility routine.
         </para>
 
         <para>
 
--

Since this is the BitBake manual, I do not think it is appropriate to refer to OE specific behavior here.

//Peter