diff options
author | Stephen Glancy <sglancy@us.ibm.com> | 2017-09-25 15:37:42 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-10-03 16:33:41 -0400 |
commit | aa88ac251a8f036165b44435b76e0dce66e5247a (patch) | |
tree | dc6291a14a23fbe51fa3f27cb81cfb80fadb81d4 /src | |
parent | cf8e670f8a54e8eaac7778c927188594045a6e04 (diff) | |
download | talos-hostboot-aa88ac251a8f036165b44435b76e0dce66e5247a.tar.gz talos-hostboot-aa88ac251a8f036165b44435b76e0dce66e5247a.zip |
Updates DRAM minimum utilization to 25%
Change-Id: I7af6a56573e5190607977e5743055b4dc02f2511
CQ:SW396389
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46696
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46706
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C | 12 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.H | 11 |
2 files changed, 18 insertions, 5 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C index ee15073e5..ac0c1b739 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C @@ -49,6 +49,7 @@ namespace mss { namespace power_thermal { + /// /// @brief Constructor /// @param[in] i_target MCS target to call power thermal stuff on @@ -458,8 +459,13 @@ void throttle::calc_util_usage(const uint32_t i_slope, //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; - //Can't have zero - o_util = (o_util == 0) ? MIN_UTIL : o_util; + // Check for the minimum threshnold and update if need be + if(o_util < MIN_UTIL) + { + FAPI_INF("Calculated utilization (%lu) is less than the minimum utilization: %lu. Setting to minimum value", o_util, + MIN_UTIL); + o_util = MIN_UTIL; + } } /// @@ -721,7 +727,7 @@ fapi_try_exit: /// fapi2::ReturnCode set_runtime_m_and_watt_limit( const std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCS> >& i_targets ) { - uint32_t l_m_clocks; + uint32_t l_m_clocks = 0; uint32_t l_vmem_power_limit_dimm = 0; uint8_t l_max_dimms = 0; diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.H b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.H index 70156eb04..637d1be79 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.H @@ -57,7 +57,7 @@ enum throttle_const : size_t PERCENT_CONVERSION = 100, /// MIN_UTIL is in c% - MIN_UTIL = 100, + MIN_UTIL = 2500, /// IDLE_UTIL is in c% IDLE_UTIL = 0, @@ -264,6 +264,7 @@ inline uint32_t throttled_cmds(const uint32_t i_databus_util, const uint32_t i_n /// /// @brief Calculate the port databus utilization based off of N throttles and M dram clocks +/// @tparam T output type /// @param[in] i_n_throttles N (address operations) allowed within a window of M DRAM clocks /// @param[in] i_num_dram_clocks window of M DRAM clocks /// @param[out] o_calc_util @@ -296,7 +297,13 @@ fapi2::ReturnCode calc_util_from_throttles(const uint16_t i_n_throttles, l_multiplier, i_num_dram_clocks); - o_calc_util = ( (o_calc_util == 0) ? MIN_UTIL : o_calc_util); + // Check for the minimum + if(o_calc_util < MIN_UTIL) + { + FAPI_INF("Calculated utilization (%lu) is less than the minimum utilization: %lu. Setting to minimum value", + o_calc_util, MIN_UTIL); + o_calc_util = MIN_UTIL; + } FAPI_INF("In calc_util_from_throttles, calculated %d for output utilization", o_calc_util); return fapi2::FAPI2_RC_SUCCESS; |