summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbroyles <mbroyles@us.ibm.com>2017-12-07 13:06:35 -0600
committerMartha Broyles <mbroyles@us.ibm.com>2017-12-11 13:01:41 -0500
commit49ea880a77890b05a7b06cdf083122acb7f15a10 (patch)
tree9b526a9d024d72c91e68b68984fabd197d9545a9
parent01ae49578a8e854af3c58641cd37f4c1bfeb0fd6 (diff)
downloadtalos-occ-49ea880a77890b05a7b06cdf083122acb7f15a10.tar.gz
talos-occ-49ea880a77890b05a7b06cdf083122acb7f15a10.zip
Wait two ticks prior to un-throttling memory due to power capping
Disable 24x7 on first tick GPE exceeds tick time Only update snapshot buffer in active, observation or characterization states Change-Id: I388878623d8bb6af2dd2cb93b21bf1102d7877b9 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50658 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
-rwxr-xr-xsrc/occ_405/amec/amec_pcap.c19
-rw-r--r--src/occ_405/amec/amec_sensors_fw.c20
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_snapshot.c3
3 files changed, 23 insertions, 19 deletions
diff --git a/src/occ_405/amec/amec_pcap.c b/src/occ_405/amec/amec_pcap.c
index caf8419..d2295ee 100755
--- a/src/occ_405/amec/amec_pcap.c
+++ b/src/occ_405/amec/amec_pcap.c
@@ -43,6 +43,9 @@
//*************************************************************************/
#define PPB_NOM_DROP_DELAY 4 //ticks
+//Number of consecutive ticks with power available to wait before un-throttling memory
+#define UNTHROTTLE_MEMORY_DELAY 2 // ticks
+
//*************************************************************************/
// Structures
//*************************************************************************/
@@ -337,6 +340,7 @@ void amec_pcap_calc(const bool i_oversub_state)
uint32_t l_proc_fraction = 0;
static uint32_t L_prev_node_pcap = 0;
static bool L_apss_error_traced = FALSE;
+ static uint32_t L_ticks_mem_pwr_available = 0;
// Determine the active power cap. norm_node_pcap is set as lowest
// between sys (N+1 mode) and user in amec_data_write_pcap()
@@ -400,10 +404,16 @@ void amec_pcap_calc(const bool i_oversub_state)
if(l_avail_power >= mem_pwr_diff)
{
- TRAC_IMP("PCAP: Un-Throttling memory");
- g_amec->pcap.active_mem_level = 0;
- // don't let the proc have any available power this tick
- l_avail_power = 0;
+ L_ticks_mem_pwr_available++;
+
+ if(L_ticks_mem_pwr_available == UNTHROTTLE_MEMORY_DELAY)
+ {
+ TRAC_IMP("PCAP: Un-Throttling memory");
+ g_amec->pcap.active_mem_level = 0;
+ L_ticks_mem_pwr_available = 0;
+ // don't let the proc have any available power this tick
+ l_avail_power = 0;
+ }
}
}
// check if need to reduce power and frequency is already at the min
@@ -415,6 +425,7 @@ void amec_pcap_calc(const bool i_oversub_state)
{
TRAC_IMP("PCAP: Throttling memory");
g_amec->pcap.active_mem_level = 1;
+ L_ticks_mem_pwr_available = 0;
}
}
else
diff --git a/src/occ_405/amec/amec_sensors_fw.c b/src/occ_405/amec/amec_sensors_fw.c
index daf9fd7..6c5a1c0 100644
--- a/src/occ_405/amec/amec_sensors_fw.c
+++ b/src/occ_405/amec/amec_sensors_fw.c
@@ -103,7 +103,6 @@ void task_gpe_timings(task_t * i_task)
static bool L_first_call = TRUE;
bool l_gpe0_idle = TRUE;
bool l_gpe1_idle = TRUE;
-
static uint8_t L_consec_trace_count[2] = {0};
gpe_gpenxiramdbg_t xsr_sprg0 = {0};
gpe_gpenxiramedr_t ir_edr = {0};
@@ -251,32 +250,27 @@ void task_gpe_timings(task_t * i_task)
{
// Reset how many consecutive ticks we were busy for.
L_busyTicks = 0;
+ L_idleTicks++;
- // If we were idle for at least 16 consecutive ticks, enable 24x7
- if( L_idleTicks >= 15 )
+ // If we were idle for a complete cycle thru all ticks, re-enable 24x7
+ if( L_idleTicks >= MAX_NUM_TICKS )
{
G_24x7_disabled = FALSE;
}
- else
- {
- L_idleTicks++;
- }
}
else
{
// Reset how many consecutive ticks we were idle for
L_idleTicks = 0;
+ L_busyTicks++;
- // If we were busy for at least 2 consecutive ticks, disable 24x7
- if( L_busyTicks >= 1 )
+ // disable 24x7 if it isn't already, this will stay disabled until we can run all
+ // ticks consecutively
+ if( !G_24x7_disabled )
{
G_24x7_disabled = TRUE;
INCREMENT_ERR_HISTORY(ERRH_24X7_DISABLED);
}
- else
- {
- L_busyTicks++;
- }
}
L_first_call = FALSE;
diff --git a/src/occ_405/cmdh/cmdh_snapshot.c b/src/occ_405/cmdh/cmdh_snapshot.c
index a457f5e..ecb9afc 100755
--- a/src/occ_405/cmdh/cmdh_snapshot.c
+++ b/src/occ_405/cmdh/cmdh_snapshot.c
@@ -382,9 +382,8 @@ void cmdh_snapshot_callback(void * arg)
g_cmdh_snapshot_reset = FALSE;
g_cmdh_snapshot_cur_index = CMDH_SNAPSHOT_DEFAULT_CUR_INDEX;
}
- else
+ else if (IS_OCC_STATE_OBSERVATION() || IS_OCC_STATE_ACTIVE() || IS_OCC_STATE_CHARACTERIZATION())
{
-
uint32_t l_pwr_accum_diff = 0;
uint32_t l_pwr_uptag_diff = 0;
OpenPOWER on IntegriCloud