Bug 14692 - Use pressure stall information to stop queueing tasks
Summary: Use pressure stall information to stop queueing tasks
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 4.1
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 5.99
Assignee: Randy MacLeod
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-01-17 09:56 UTC by Alexandre Belloni
Modified: 2023-10-25 19:08 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Belloni 2022-01-17 09:56:52 UTC
The kernel now exports the information on the pressure the system experiences in /proc/pressure.

It would be great to use that information and avoid starting new tasks when the cpu, memory or io pressure is too high.

A variable should allow the user to configure the threshold and behaviour, similar to what BB_DISKMON_DIRS does. However, a new action needs to be created as STOPTASKS will stop the build and we want the bitbake to resume starting tasks once the pressure goes down.
Comment 1 Randy MacLeod 2023-10-24 14:24:39 UTC
Bulk move from 4.99 or 0.00 to 5.99
Comment 2 Alexandre Belloni 2023-10-25 11:20:03 UTC
Does this need to be closed?
Comment 3 Randy MacLeod 2023-10-25 19:08:19 UTC
Fixed by a variety of commits:
https://git.openembedded.org/bitbake/log/?qt=grep&q=pressure

The main / first one being:

https://git.openembedded.org/bitbake/commit/?id=502e05cbe67fb7a0e804dcc2cc0764a2e05c014f

It needs some tuning in conjunction with he jobserver RFC posted here: 

https://lore.kernel.org/openembedded-core/20230828124834.376779-1-martin@geanix.com/#r

but it's useful and helpful as is.