Skip to contentSkip to conversation

doc: bitbake-user-manual: Add definition for BB_PRESSURE_MAX variables

PATCH In review Aryaman Gupta 4 participants 6 messages Aug 12, 2022 – Sep 5, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 doc: bitbake-user-manual: Add definition for BB_PRESSURE_MAX variables

Add the definitions for the BB_PRESSURE_MAX{CPU|IO|MEMORY} variables in the bitbake varibales glossary. Further information on how to determine a good threshold will be added to the Yocto reference manual in a later commit.

---
 .../bitbake-user-manual-ref-variables.rst     | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +30 -0
index 12aef3cb..9b2027de 100644
@@ -482,6 +482,36 @@ overview of their function and contents.
 
          You must set this variable in the external environment in order
          for it to work.
+   
+   :term:`BB_PRESSURE_MAX_CPU`
+      The threshold for maximum CPU pressure before BitBake prevents the
+      scheduling of new tasks. Once the :term:`BB_PRESSURE_MAX_CPU` threshold
+      is exceeded, new tasks are not started until the pressure subsides to
+      below the threshold. If :term:`BB_PRESSURE_MAX_CPU` is not set, CPU
+      pressure is not monitored. A threshold can be set in ``conf/local.conf``
+      as:
+      ::
+
+         BB_PRESSURE_MAX_CPU = "500"
+
+      Information about how to set a suitable value and some other caveats to
+      consider can be found in the
+      :ref:`Reference Manual </ref-manual/variables:BB_PRESSURE_MAX_CPU>``
+
+   :term:`BB_PRESSURE_MAX_IO`
+      The threshold for maximum IO pressure experienced before BitBake
+      prevents the scheduling of new tasks. The IO pressure is regulated in the
+      same way as :term:`BB_PRESSURE_MAX_CPU`. At this point in time,
+      experiments show that IO pressure tends to be short-lived and regulating
+      just the CPU can help to reduce it.
+
+   :term:`BB_PRESSURE_MAX_MEMORY`
+      The threshold for maximum memory pressure experienced before BitBake
+      prevents the scheduling of new tasks. The memory pressure is regulated in
+      the same way as :term:`BB_PRESSURE_MAX_CPU`. Note that any memory
+      pressure indicates that a system is being pushed beyond it's capacity. At
+      this point in time, experiments show that memory pressure tends to be
+      short-lived and regulating just the CPU can help to reduce it.
 
    :term:`BB_RUNFMT`
       Specifies the name of the executable script files (i.e. run files)
Signature · 1 line
2.35.3
#1 lore raw

Hi Aryaman,

Many thanks for the patch! Apologies for the late review, I was away on vacation.

See my comments below:

Quoted 17 lines · Aryaman Gupta

Add the definitions for the BB_PRESSURE_MAX{CPU|IO|MEMORY} variables in the bitbake varibales glossary. Further information on how to determine a good threshold will be added to the Yocto reference manual in a later commit.

---
  .../bitbake-user-manual-ref-variables.rst     | 30 +++++++++++++++++++
  1 file changed, 30 insertions(+)
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +0 -0
index 12aef3cb..9b2027de 100644
@@ -482,6 +482,36 @@ overview of their function and contents.
 
           You must set this variable in the external environment in order

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 493

Quoted 10 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +9 -0
           for it to work.
+
+   :term:`BB_PRESSURE_MAX_CPU`
+      The threshold for maximum CPU pressure before BitBake prevents the
+      scheduling of new tasks. Once the :term:`BB_PRESSURE_MAX_CPU` threshold
+      is exceeded, new tasks are not started until the pressure subsides to
+      below the threshold. If :term:`BB_PRESSURE_MAX_CPU` is not set, CPU
+      pressure is not monitored. A threshold can be set in ``conf/local.conf``
+      as:
+      ::

Actually, here you can just use "as::" instead of "as:" followed by "::" in the next line.

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 499

Quoted 6 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +6 -0
+
+         BB_PRESSURE_MAX_CPU = "500"
+
+      Information about how to set a suitable value and some other caveats to
+      consider can be found in the
+      :ref:`Reference Manual </ref-manual/variables:BB_PRESSURE_MAX_CPU>``

I'm afraid you'll have to add this reference in a later commit, because for the moment, this creates a warning that is turned into an error. Sorry, this is the pain of managing two manuals at once. You may say "Yocto Project Reference Manual" then.

By the way, you had an extra backquote at the end of your reference.

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 512

Quoted 13 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +13 -0
+
+   :term:`BB_PRESSURE_MAX_IO`
+      The threshold for maximum IO pressure experienced before BitBake
+      prevents the scheduling of new tasks. The IO pressure is regulated in the
+      same way as :term:`BB_PRESSURE_MAX_CPU`. At this point in time,
+      experiments show that IO pressure tends to be short-lived and regulating
+      just the CPU can help to reduce it.
+
+   :term:`BB_PRESSURE_MAX_MEMORY`
+      The threshold for maximum memory pressure experienced before BitBake
+      prevents the scheduling of new tasks. The memory pressure is regulated in
+      the same way as :term:`BB_PRESSURE_MAX_CPU`. Note that any memory
+      pressure indicates that a system is being pushed beyond it's capacity. At

s/it's/its/

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 517

Quoted 5 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +2 -0
+      this point in time, experiments show that memory pressure tends to be
+      short-lived and regulating just the CPU can help to reduce it.
 
     :term:`BB_RUNFMT`
        Specifies the name of the executable script files (i.e. run files)

Would you mind sending a V3 fixing these, please? This one should be ready to merge. Thanks in advance, and thank you for your patience :)

Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
Quoted 75 lines · Michael Opdenacker via lists.openembedded.org

Hi Aryaman,

Many thanks for the patch! Apologies for the late review, I was away on vacation.

See my comments below:

Quoted 17 lines · Aryaman Gupta

Add the definitions for the BB_PRESSURE_MAX{CPU|IO|MEMORY} variables in the bitbake varibales glossary. Further information on how to determine a good threshold will be added to the Yocto reference manual in a later commit.

---
  .../bitbake-user-manual-ref-variables.rst     | 30 +++++++++++++++++++
  1 file changed, 30 insertions(+)
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +0 -0
index 12aef3cb..9b2027de 100644
@@ -482,6 +482,36 @@ overview of their function and contents.
 
           You must set this variable in the external environment in order

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 493

Quoted 10 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +9 -0
           for it to work.
+
+   :term:`BB_PRESSURE_MAX_CPU`
+      The threshold for maximum CPU pressure before BitBake prevents the
+      scheduling of new tasks. Once the :term:`BB_PRESSURE_MAX_CPU` threshold
+      is exceeded, new tasks are not started until the pressure subsides to
+      below the threshold. If :term:`BB_PRESSURE_MAX_CPU` is not set, CPU
+      pressure is not monitored. A threshold can be set in ``conf/local.conf``
+      as:
+      ::

Actually, here you can just use "as::" instead of "as:" followed by "::" in the next line.

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 499

Quoted 6 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +6 -0
+
+         BB_PRESSURE_MAX_CPU = "500"
+
+      Information about how to set a suitable value and some other caveats to
+      consider can be found in the
+      :ref:`Reference Manual </ref-manual/variables:BB_PRESSURE_MAX_CPU>``

I'm afraid you'll have to add this reference in a later commit, because for the moment, this creates a warning that is turned into an error. Sorry, this is the pain of managing two manuals at once. You may say "Yocto Project Reference Manual" then.

By the way, you had an extra backquote at the end of your reference.

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 512

Quoted 13 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +13 -0
+
+   :term:`BB_PRESSURE_MAX_IO`
+      The threshold for maximum IO pressure experienced before BitBake
+      prevents the scheduling of new tasks. The IO pressure is regulated in the
+      same way as :term:`BB_PRESSURE_MAX_CPU`. At this point in time,
+      experiments show that IO pressure tends to be short-lived and regulating
+      just the CPU can help to reduce it.
+
+   :term:`BB_PRESSURE_MAX_MEMORY`
+      The threshold for maximum memory pressure experienced before BitBake
+      prevents the scheduling of new tasks. The memory pressure is regulated in
+      the same way as :term:`BB_PRESSURE_MAX_CPU`. Note that any memory
+      pressure indicates that a system is being pushed beyond it's capacity. At

s/it's/its/

Quoted 3 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +2 -0
+      this point in time, experiments show that memory pressure tends to be
+      short-lived and regulating just the CPU can help to reduce it.
 
Quoted 7 lines

doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst overview of their function and contents. · line 517

Quoted 2 lines
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +0 -0
     :term:`BB_RUNFMT`
        Specifies the name of the executable script files (i.e. run files)

Would you mind sending a V3 fixing these, please? This one should be ready to merge.
Thanks in advance, and thank you for your patience :)

Aryaman is no longer at Wind River so we may need to handle the tweaks ourselves.

Cheers,

Richard

#3 lore raw

PATCH v3 1/1 doc: bitbake-user-manual: Add definition for BB_PRESSURE_MAX variables

From: Michael Opdenacker <[email protected]>

From: Aryaman Gupta <[email protected]>

Add the definitions for the BB_PRESSURE_MAX{CPU|IO|MEMORY} variables in the bitbake varibales glossary. Further information on how to determine a good threshold will be added to the Yocto reference manual in a later commit.

---

Changes in V3:
- Remove reference to Yocto Project manual, not documenting the variables yet.
- Fix a typo ("it's" -> "its")
- Simplify syntax (":" followed by "::" replaced by "::"

---
 .../bitbake-user-manual-ref-variables.rst     | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +25 -0
index 12aef3cb..725e6c2c 100644
@@ -483,6 +483,31 @@ overview of their function and contents.
          You must set this variable in the external environment in order
          for it to work.
 
+   :term:`BB_PRESSURE_MAX_CPU`
+      The threshold for maximum CPU pressure before BitBake prevents the
+      scheduling of new tasks. Once the :term:`BB_PRESSURE_MAX_CPU` threshold
+      is exceeded, new tasks are not started until the pressure subsides to
+      below the threshold. If :term:`BB_PRESSURE_MAX_CPU` is not set, CPU
+      pressure is not monitored. A threshold can be set in ``conf/local.conf``
+      as::
+
+         BB_PRESSURE_MAX_CPU = "500"
+
+   :term:`BB_PRESSURE_MAX_IO`
+      The threshold for maximum IO pressure experienced before BitBake
+      prevents the scheduling of new tasks. The IO pressure is regulated in the
+      same way as :term:`BB_PRESSURE_MAX_CPU`. At this point in time,
+      experiments show that IO pressure tends to be short-lived and regulating
+      just the CPU can help to reduce it.
+
+   :term:`BB_PRESSURE_MAX_MEMORY`
+      The threshold for maximum memory pressure experienced before BitBake
+      prevents the scheduling of new tasks. The memory pressure is regulated in
+      the same way as :term:`BB_PRESSURE_MAX_CPU`. Note that any memory
+      pressure indicates that a system is being pushed beyond its capacity. At
+      this point in time, experiments show that memory pressure tends to be
+      short-lived and regulating just the CPU can help to reduce it.
+
    :term:`BB_RUNFMT`
       Specifies the name of the executable script files (i.e. run files)
       saved into ``${``\ :term:`T`\ ``}``. By default, the
Signature · 1 line
2.34.1
Reviewed-by on v3 1/1
#4 lore raw

Hi Michael,

Quoted 10 lines · Michael Opdenacker via lists.openembedded.org

From: Michael Opdenacker <[email protected]>

From: Aryaman Gupta <[email protected]>

Add the definitions for the BB_PRESSURE_MAX{CPU|IO|MEMORY} variables in the bitbake varibales glossary. Further information on how to determine a good threshold will be added to the Yocto reference manual in a later commit.

IIRC you're supposed to add your SoB when you're sending a patch even if it comes from someone else.

Otherwwise, looks good.

Thanks Aryaman, Michael,
Quentin

#5 lore raw

Hi Quentin

Quoted 11 lines · Quentin Schulz

Hi Michael,

Quoted 8 lines · Michael Opdenacker via lists.openembedded.org

From: Michael Opdenacker <[email protected]>

From: Aryaman Gupta <[email protected]>

Add the definitions for the BB_PRESSURE_MAX{CPU|IO|MEMORY} variables in the bitbake varibales glossary. Further information on how to determine a good threshold will be added to the Yocto reference manual in a later commit.

Quoted 8 lines
Quoted 2 lines

IIRC you're supposed to add your SoB when you're sending a patch even if it comes from someone else.

Otherwwise, looks good.

Thanks for the clarification. Indeed, according to https://www.kernel.org/doc/html/latest/process/submitting-patches.html?highlight=further+sobs#sign-your-work-the-developer-s-certificate-of-origin, anyone participating to the distribution of the patch should add his/her SoB too.

I'll keep this in mind next time. I hope Richard can add those when merging.

Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com