[bitbake-devel] doc: Explain dynamic calculation of BB_NUMBER_THREADS

Submitted by Robert P. J. Day on Feb. 7, 2020, 9:52 a.m. | Patch ID: 169806

Details

Message ID alpine.LFD.2.21.2002070449140.2057256@localhost.localdomain
State New
Headers show

Commit Message

Robert P. J. Day Feb. 7, 2020, 9:52 a.m.
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.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---


--

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

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

Patch hide | download patch | download mbox

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
index 46dafeee..f22ab36e 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
+++ b/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
@@ -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>

Comments

Peter Kjellerstedt Feb. 7, 2020, 4:02 p.m.
> -----Original Message-----
> From: bitbake-devel-bounces@lists.openembedded.org <bitbake-devel-
> bounces@lists.openembedded.org> On Behalf Of Robert P. J. Day
> Sent: den 7 februari 2020 10:52
> To: BitBake developer list <bitbake-devel@lists.openembedded.org>
> 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.
> 
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> 
> ---
> 
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> index 46dafeee..f22ab36e 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> @@ -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>
> 
> --

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

//Peter