diff options
author | Chris Cain <cjcain@us.ibm.com> | 2017-12-12 12:00:49 -0600 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-12-15 16:10:03 -0500 |
commit | 02098ca7d9c127a77b88692f1569938679e8c105 (patch) | |
tree | 38f9851c7ac0f095fcae6cd4b46f364d3eb530fa /src/usr/htmgt/htmgt_memthrottles.C | |
parent | fd12b61b55f27a6a9f83e4571b2034e8d6191ba0 (diff) | |
download | talos-hostboot-02098ca7d9c127a77b88692f1569938679e8c105.tar.gz talos-hostboot-02098ca7d9c127a77b88692f1569938679e8c105.zip |
HTMGT: Pass power per DIMM to memory throttling procedures
Add capability to dump OCC config data
Change-Id: I214346577af050a279fa4d2467b8ddeea7b1db71
CQ: SW410627
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50817
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: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/htmgt_memthrottles.C')
-rw-r--r-- | src/usr/htmgt/htmgt_memthrottles.C | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/usr/htmgt/htmgt_memthrottles.C b/src/usr/htmgt/htmgt_memthrottles.C index cb9dca192..c75175de6 100644 --- a/src/usr/htmgt/htmgt_memthrottles.C +++ b/src/usr/htmgt/htmgt_memthrottles.C @@ -243,14 +243,16 @@ errlHndl_t memPowerThrottleRedPower( power = (power * i_efficiency) / 100; } - //Find the Watt target for each MCS - if (i_fapi_target_list.size()) + //Find the Watt target for each present DIMM + TargetHandleList dimm_list; + getAllLogicalCards(dimm_list, TYPE_DIMM, false); + if (dimm_list.size()) { - wattTarget = power / i_fapi_target_list.size(); + wattTarget = power / dimm_list.size(); } - TMGT_INF("memPowerThrottleRedPower: N+1 power: %dW / %dcW per MCS", - power/100, wattTarget); + TMGT_INF("memPowerThrottleRedPower: N+1 power: %dW / %dcW per DIMM " + "(%d DIMMs)", power/100, wattTarget, dimm_list.size()); //Calculate the throttles err = call_bulk_pwr_throttles(i_fapi_target_list, @@ -258,7 +260,7 @@ errlHndl_t memPowerThrottleRedPower( i_utilization); if (NULL == err) { - G_mem_power_min_throttles = 0; + uint32_t tot_mem_power_cw = 0; for(auto & mcs_fapi_target : i_fapi_target_list) { // Read HWP output parms: @@ -271,8 +273,8 @@ errlHndl_t memPowerThrottleRedPower( mcs_fapi_target, l_port); FAPI_ATTR_GET(fapi2::ATTR_MSS_PORT_MAXPOWER, mcs_fapi_target, l_power); - // Calculate memory power at min throttles (in Watts) - G_mem_power_min_throttles += (l_power[0] + l_power[1])/100; + // Calculate memory power at min throttles + tot_mem_power_cw += l_power[0] + l_power[1]; // Update MCS data (to be sent to OCC) TARGETING::Target * mcs_target = @@ -292,6 +294,8 @@ errlHndl_t memPowerThrottleRedPower( occ_instance, mcs_unit, l_slot[0], l_slot[1], l_port[0], l_port[1], l_power[0], l_power[1]); } + // Convert memory power to Watts + G_mem_power_min_throttles = tot_mem_power_cw / 100; TMGT_INF("memPowerThrottleRedPower: Total Redundant Memory Power: %dW", G_mem_power_min_throttles); } @@ -330,7 +334,7 @@ errlHndl_t memPowerThrottlePowercap( } if (NULL == err) { - G_mem_power_max_throttles = 0; + uint32_t tot_mem_power_cw = 0; for(auto & mcs_fapi_target : i_fapi_target_list) { TARGETING::Target * mcs_target = @@ -383,8 +387,8 @@ errlHndl_t memPowerThrottlePowercap( mcs_target->setAttr<ATTR_POWERCAP_N_PER_MBA>(l_slot); mcs_target->setAttr<ATTR_POWERCAP_N_PER_CHIP>(l_port); mcs_target->setAttr<ATTR_POWERCAP_MEM_POWER>(l_power); - // Calculate memory power at max throttles (in Watts) - G_mem_power_max_throttles += (l_power[0] + l_power[1]) / 100; + // Calculate memory power at max throttles + tot_mem_power_cw += l_power[0] + l_power[1]; // Trace Results TMGT_INF("memPowerThrottlePowercap: PCAP: OCC%d/MCS%d - " @@ -392,6 +396,8 @@ errlHndl_t memPowerThrottlePowercap( occ_instance, mcs_unit, l_slot[0], l_slot[1], l_port[0], l_port[1], l_power[0], l_power[1]); } + // Convert memory power to Watts + G_mem_power_max_throttles = tot_mem_power_cw / 100; TMGT_INF("memPowerThrottlePowercap: Total PowerCap Memory" " Power: %dW (@max throttles)", G_mem_power_max_throttles); } @@ -529,7 +535,7 @@ errlHndl_t calcMemThrottles() assert(proc_target != nullptr); occ_instance = proc_target->getAttr<TARGETING::ATTR_POSITION>(); TMGT_INF("calcMemThrottles: OCC%d, MCS%d HUID:0x%08X has %d" - " functional MCSs", + " functional MCAs", occ_instance, mcs_unit, mcs_huid, mca_list.size()); // Convert to FAPI target and add to list |