Skip to content

Commit

Permalink
Updates DRAM minimum utilization to 25%
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sglancy6 authored and dcrowell77 committed Oct 3, 2017
1 parent cf8e670 commit aa88ac2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
Expand Up @@ -49,6 +49,7 @@ namespace mss
{
namespace power_thermal
{

///
/// @brief Constructor
/// @param[in] i_target MCS target to call power thermal stuff on
Expand Down Expand Up @@ -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;
}
}

///
Expand Down Expand Up @@ -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;

Expand Down
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit aa88ac2

Please sign in to comment.