Ask the system to turn on dynamically offlined CPUs
#include <sys/sysmgr.h> int sysmgr_runstate_burst( const unsigned ms_length );
- The length of time, in milliseconds, that the user expects the system to be busy, or 0 to cancel the burst-mode request. The time can be up to 65535 ms.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Most of the time, the dynamic CPU-onlining algorithm works fine, but it can take up to 64 ms to decide that there's enough system load to turn on a dynamically offlined CPU, and sometimes we just don't want to wait that long. The sysmgr_runstate_burst() function tells the kernel that the system is about to get busy, and it should be turning on CPUs much sooner than it would normally.
Multiple threads can call the function, and burst mode remains in effect until the last time period expires. A thread can cancel its burst-mode request by calling sysmgr_runstate_burst() again with an argument of 0; any other thread requests remain in force.
In order to successfully call this function, your process must have the PROCMGR_AID_RUNSTATE_BURST ability enabled. For more information, see procmgr_ability().
An errno value if an error occurred.
Last modified: 2013-09-30