mirror of
https://github.com/simh/simh.git
synced 2026-01-26 04:01:38 +00:00
TIMER: Fix throttling calibration and recalibration
- Throttling delays are self adjusting for specific speed throttling (K cycles and M cycles and % cycles). - Throttling starts after THROT_DELAY seconds of execution. - THROT_DELAY is a register accessible via EXAMINE and DEPOSIT once throttling has been enabled. - Throttle sleep times are recalibrated every 10 seconds based on execution performance for the prior 10 seconds if the current execution rate differs from the desired rate by more than THROT_DRIFT_PCT. THROT_DRIFT_PCT defaults to 5 and is a register accessible via EXAMINE and DEPOSIT once throttling has been enabled. - Addressing details reported in #508
This commit is contained in:
22
sim_timer.h
22
sim_timer.h
@@ -84,17 +84,17 @@ int clock_gettime(int clock_id, struct timespec *tp);
|
||||
#define SIM_IDLE_STDFLT 20 /* dft sec for stability */
|
||||
#define SIM_IDLE_STMAX 600 /* max sec for stability */
|
||||
|
||||
#define SIM_THROT_WINIT 1000 /* cycles to skip */
|
||||
#define SIM_THROT_WST 10000 /* initial wait */
|
||||
#define SIM_THROT_WMUL 4 /* multiplier */
|
||||
#define SIM_THROT_WMIN 50 /* min wait */
|
||||
#define SIM_THROT_DRIFT_PCT 5 /* drift percentage for recalibrate */
|
||||
#define SIM_THROT_MSMIN 10 /* min for measurement */
|
||||
#define SIM_THROT_NONE 0 /* throttle parameters */
|
||||
#define SIM_THROT_MCYC 1 /* MegaCycles Per Sec */
|
||||
#define SIM_THROT_KCYC 2 /* KiloCycles Per Sec */
|
||||
#define SIM_THROT_PCT 3 /* Max Percent of host CPU */
|
||||
#define SIM_THROT_SPC 4 /* Specific periodic Delay */
|
||||
#define SIM_THROT_WINIT 1000 /* cycles to skip */
|
||||
#define SIM_THROT_WST 10000 /* initial wait */
|
||||
#define SIM_THROT_WMUL 4 /* multiplier */
|
||||
#define SIM_THROT_WMIN 50 /* min wait */
|
||||
#define SIM_THROT_DRIFT_PCT_DFLT 5 /* drift percentage for recalibrate */
|
||||
#define SIM_THROT_MSMIN 10 /* min for measurement */
|
||||
#define SIM_THROT_NONE 0 /* throttle parameters */
|
||||
#define SIM_THROT_MCYC 1 /* MegaCycles Per Sec */
|
||||
#define SIM_THROT_KCYC 2 /* KiloCycles Per Sec */
|
||||
#define SIM_THROT_PCT 3 /* Max Percent of host CPU */
|
||||
#define SIM_THROT_SPC 4 /* Specific periodic Delay */
|
||||
#define SIM_THROT_STATE_INIT 0 /* Starting */
|
||||
#define SIM_THROT_STATE_TIME 1 /* Checking Time */
|
||||
#define SIM_THROT_STATE_THROTTLE 2 /* Throttling */
|
||||
|
||||
Reference in New Issue
Block a user