summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-06-18 15:06:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-19 17:09:17 +0100
commitd05a268c5069c3fb47ceed47862ba36b5f49ebd3 (patch)
tree40b25d38c577fcf5e195efafc3c1fffc5647c9a1
parent53dfa673d78216f852a47bdb48392ee213e3e1cd (diff)
downloadpoky-d05a268c5069c3fb47ceed47862ba36b5f49ebd3.tar.gz
bitbake: bitbake-user-manual: Added "number_threads" varflag
You can now limit on a task-specific basis the number of threads a task will use. This is useful for machines that have high numbers of cores and need to be rate-limited due to various resource constraints. (Bitbake rev: 4937ed392fdc4442dd91f644f329dda29f27242c) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml32
1 files changed, 32 insertions, 0 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index b4fc64e753..bc08c814d1 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -1929,6 +1929,38 @@
1929 not careful. 1929 not careful.
1930 </note> 1930 </note>
1931 </para></listitem> 1931 </para></listitem>
1932 <listitem><para><emphasis><filename>[number_threads]</filename>:</emphasis>
1933 Limits tasks to a specific number of simultaneous threads
1934 during execution.
1935 This varflag is useful when your build host has a large number
1936 of cores but certain tasks need to be rate-limited due to various
1937 kinds of resource constraints (e.g. to avoid network throttling).
1938 <filename>number_threads</filename> works similarly to the
1939 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
1940 variable but is task-specific.</para>
1941
1942 <para>Set the value globally.
1943 For example, the following makes sure the
1944 <filename>do_fetch</filename> task uses no more than two
1945 simultaneous execution threads:
1946 <literallayout class='monospaced'>
1947 do_fetch[number_threads] = "2"
1948 </literallayout>
1949 <note><title>Warnings</title>
1950 <itemizedlist>
1951 <listitem><para>
1952 Setting the varflag in individual recipes rather
1953 than globally can result in unpredictable behavior.
1954 </para></listitem>
1955 <listitem><para>
1956 Setting the varflag to a value greater than the
1957 value used in the <filename>BB_NUMBER_THREADS</filename>
1958 variable causes <filename>number_threads</filename>
1959 to have no effect.
1960 </para></listitem>
1961 </itemizedlist>
1962 </note>
1963 </para></listitem>
1932 <listitem><para><emphasis><filename>[postfuncs]</filename>:</emphasis> 1964 <listitem><para><emphasis><filename>[postfuncs]</filename>:</emphasis>
1933 List of functions to call after the completion of the task. 1965 List of functions to call after the completion of the task.
1934 </para></listitem> 1966 </para></listitem>