summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2017-12-01 16:34:41 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-12-07 11:06:29 -0500
commitbeeeedc755915b77ab0d4305649b6b5c25f79296 (patch)
tree168e9de0160e8ed03fdf283ea6105c0d51ca322a /src/usr/htmgt
parente4d01510117e247cf1b64a46c07ef435ec02164f (diff)
downloadtalos-hostboot-beeeedc755915b77ab0d4305649b6b5c25f79296.tar.gz
talos-hostboot-beeeedc755915b77ab0d4305649b6b5c25f79296.zip
HTMGT: Pass utilization in hundredth units to HWP for mem throttling
Change-Id: Ibf974345e23582e69f468ceeb550efad1d1678ca CQ: SW409089 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50396 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Sheldon R. Bailey <baileysh@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt')
-rw-r--r--src/usr/htmgt/htmgt_memthrottles.C25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/usr/htmgt/htmgt_memthrottles.C b/src/usr/htmgt/htmgt_memthrottles.C
index 0a1fafa13..cb9dca192 100644
--- a/src/usr/htmgt/htmgt_memthrottles.C
+++ b/src/usr/htmgt/htmgt_memthrottles.C
@@ -58,7 +58,7 @@ namespace HTMGT
* Run hardware procedure to determine throttle/numerator/number of commands
* based on the specified utilization
*
- * @param[in] i_utilization - Minimum utilization value required
+ * @param[in] i_utilization - Minimum utilization value required (in %)
* @param[in] i_watt_target - power target required for bulk_pwr_throttles
*/
errlHndl_t call_utils_to_throttle(
@@ -67,11 +67,14 @@ errlHndl_t call_utils_to_throttle(
const uint32_t i_watt_target = 0)
{
errlHndl_t err = NULL;
- uint32_t utilization[TMGT_MAX_MCA_PER_MCS] = { i_util, i_util };
+ // Convert to 1/100 % units for the HWP
+ const uint32_t util_hundredth_percent = i_util * 100;
+ uint32_t utilization[TMGT_MAX_MCA_PER_MCS] = {
+ util_hundredth_percent, util_hundredth_percent };
uint32_t l_watt_targets[TMGT_MAX_MCA_PER_MCS][TMGT_MAX_DIMM_PER_MCA] =
{i_watt_target, i_watt_target, i_watt_target, i_watt_target};
- TMGT_INF("call_utils_to_throttle: utilization: 0x%04X, watt_target: "
- "0x%04X", i_util, i_watt_target);
+ TMGT_INF("call_utils_to_throttle: utilization: %d, watt_target: %d",
+ i_util, i_watt_target);
// Update input attributes for specified targets
for(const auto & l_fapi_target : i_fapi_target_list)
@@ -484,16 +487,18 @@ errlHndl_t calcMemThrottles()
sys->getAttr<ATTR_OPEN_POWER_MIN_MEM_UTILIZATION_THROTTLING>();
if (min_utilization == 0)
{
- uint32_t l_safe_n_per_mba =
- sys->getAttr<ATTR_MSS_MRW_SAFEMODE_MEM_THROTTLED_N_COMMANDS_PER_PORT>();
+ // Use SAFEMODE utilization
+ min_utilization = sys->getAttr
+ <ATTR_MSS_MRW_SAFEMODE_MEM_THROTTLED_N_COMMANDS_PER_PORT>();
TMGT_INF("MIN_MEM_UTILIZATION_THROTTLING is 0, so reading "
"ATTR_MSS_MRW_SAFEMODE_MEM_THROTTLED_N_COMMANDS_PER_PORT:"
- " %d", l_safe_n_per_mba);
- if (l_safe_n_per_mba == 0)
+ " %d", min_utilization);
+ if (min_utilization == 0)
{
- l_safe_n_per_mba = 10;
+ // Use hardcoded utilization
+ min_utilization = 10;
TMGT_ERR("ATTR_MSS_MRW_SAFEMODE_MEM_THROTTLED_N_COMMANDS_PER_PORT"
- " is 0! Using %d", l_safe_n_per_mba);
+ " is 0! Using %d", min_utilization);
}
}
const uint8_t efficiency =
OpenPOWER on IntegriCloud