diff options
author | Louis Stermole <stermole@us.ibm.com> | 2019-06-25 14:45:26 -0400 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2019-07-09 10:21:12 -0500 |
commit | 035e5f85fe8b3f1936f74c5fa424d6bf214ab67f (patch) | |
tree | 4390a9940fc114cf9410aa4a6d30d0acc8a328ae /src/import/generic/memory | |
parent | d6bd1b69780193308c0a8156d2c7e86f0d76ccfe (diff) | |
download | talos-hostboot-035e5f85fe8b3f1936f74c5fa424d6bf214ab67f.tar.gz talos-hostboot-035e5f85fe8b3f1936f74c5fa424d6bf214ab67f.zip |
Fixes for p9a_mss_eff_config_thermal
Add setting of ATTR_EXP_MEM_WATT_TARGET
Use default slope/intercept when attribute has zero decoded value
Add check for if the power limit is greater than the intercept
Fix some trace string formatters for double variables
Change-Id: If44ee81248563a1ca8612099a19950b349dd4914
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79485
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79502
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/generic/memory')
-rw-r--r-- | src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H b/src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H index eb0533916..893a7e37b 100644 --- a/src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H +++ b/src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H @@ -590,7 +590,7 @@ fapi2::ReturnCode throttle<MC, TT>::power_regulator_throttles () l_port_power_calc_max, l_port_power_slope, l_port_power_int), - "Failed to calculate the power curve for port %s, calculated port power max is %d, idle is %d", + "Failed to calculate the power curve for port %s, calculated port power max is %f, idle is %f", mss::c_str(iv_target), l_port_power_calc_max, l_port_power_calc_idle); @@ -606,7 +606,7 @@ fapi2::ReturnCode throttle<MC, TT>::power_regulator_throttles () //Calculate the new slot values and the max power value for the port FAPI_TRY( calc_slots_and_power( l_calc_util_port), - "%s Error calculating the final throttles and power values for target with passed in port utilization %d", + "%s Error calculating the final throttles and power values for target with passed in port utilization %f", mss::c_str(iv_target), l_calc_util_port); @@ -880,15 +880,16 @@ void throttle<MC, TT>::calc_util_usage(const uint32_t i_slope, const uint32_t i_power_limit, double& o_util) const { - o_util = ((static_cast<double>(i_power_limit) - i_int) / i_slope ) * UTIL_CONVERSION; + // Return 0 utilization if our intercept is above the power limit + o_util = (i_power_limit > i_int) ? (((static_cast<double>(i_power_limit) - i_int) / i_slope ) * UTIL_CONVERSION) : 0; - //Cast to uint32 for edge case where it has decimals + // Cast to uint32 for edge case where it has decimals o_util = (static_cast<uint32_t>(o_util) < iv_databus_port_max) ? static_cast<uint32_t>(o_util) : iv_databus_port_max; // Check for the minimum threshnold and update if need be if(o_util < TT::MIN_UTIL) { - FAPI_INF("Calculated utilization (%lu) is less than the minimum utilization: %lu. Setting to minimum value for %s", + FAPI_INF("Calculated utilization (%f) is less than the minimum utilization: %lu. Setting to minimum value for %s", o_util, TT::MIN_UTIL, mss::c_str(iv_target)); o_util = TT::MIN_UTIL; @@ -927,7 +928,7 @@ fapi2::ReturnCode throttle<MC, TT>::calc_power_from_n (const uint16_t i_n_slot, //Determine the utilization for each DIMM that will maximize the port power FAPI_TRY( calc_split_util(l_calc_util_slot, l_calc_util_port, l_calc_databus_port_max), - "Error splitting the utilization for target %s with slot utilizatio %d and port util %d", + "Error splitting the utilization for target %s with slot utilizatio %f and port util %f", mss::c_str(iv_target), l_calc_util_slot, l_calc_util_port); |