Skip to content

Commit e75b51b

Browse files
stermolecrgeddes
authored andcommitted
Return failing MCA targets when MSS_CALC_PORT_POWER_EXCEEDS_MAX condition hit
Change-Id: I6e2644eda24d6d47bb06cd52640695f64e47c772 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52284 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Michael D. Pardeik <pardeik@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: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52295 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>
1 parent cc2d45a commit e75b51b

File tree

4 files changed

+38
-18
lines changed

4 files changed

+38
-18
lines changed

src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
8+
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -26,8 +26,8 @@
2626
/// @file throttle.C
2727
/// @brief Determine throttle settings for memory
2828
///
29-
// *HWP HWP Owner: Jacob Harvey <jlharvey@us.ibm.com>
30-
// *HWP HWP Backup: Andre A. Marin <aamarin@us.ibm.com>
29+
// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
30+
// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
3131
// *HWP Team: Memory
3232
// *HWP Level: 3
3333
// *HWP Consumed by: FSP:HB
@@ -788,13 +788,17 @@ fapi_try_exit:
788788
/// @brief Equalize the throttles and estimated power at those throttle levels
789789
/// @param[in] i_targets vector of MCS targets all on the same VDDR domain
790790
/// @param[in] i_throttle_type denotes if this was done for POWER (VMEM) or THERMAL (VMEM+VPP) throttles
791+
/// @param[out] o_exceeded_power vector of MCA targets where the estimated power exceeded the maximum allowed
791792
/// @return FAPI2_RC_SUCCESS iff ok
792793
/// @note sets the throttles and power to the worst case
793794
/// Called by p9_mss_bulk_pwr_throttles and by p9_mss_utils_to_throttle (so by IPL or by OCC)
794795
///
795796
fapi2::ReturnCode equalize_throttles (const std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCS> >& i_targets,
796-
const throttle_type i_throttle_type)
797+
const throttle_type i_throttle_type,
798+
std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCA> >& o_exceeded_power)
797799
{
800+
o_exceeded_power.clear();
801+
798802
//Set to max values so every compare will change to min value
799803
uint16_t l_min_slot = ~(0);
800804
uint16_t l_min_port = ~(0);
@@ -900,6 +904,8 @@ fapi2::ReturnCode equalize_throttles (const std::vector< fapi2::Target<fapi2::TA
900904
mss::c_str(l_mca),
901905
l_fin_power[l_pos],
902906
l_power_limit);
907+
908+
o_exceeded_power.push_back(l_mca);
903909
}
904910
}
905911

src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.H

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
8+
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -27,8 +27,8 @@
2727
/// @brief throttle API
2828
///
2929

30-
// *HWP HWP Owner: Jacob Harvey <jlharvey@us.ibm.com>
31-
// *HWP HWP Backup: Andre Marin <aamarin@us.ibm.com>
30+
// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com>
31+
// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
3232
// *HWP Team: Memory
3333
// *HWP Level: 3
3434
// *HWP Consumed by: FSP:HB
@@ -354,11 +354,13 @@ fapi2::ReturnCode set_runtime_m_and_watt_limit( const std::vector< fapi2::Target
354354
/// @brief Equalize the throttles and estimated power at those throttle levels
355355
/// @param[in] i_targets vector of MCS targets all on the same VDDR domain
356356
/// @param[in] i_throttle_type denotes if this was done for POWER (VMEM) or THERMAL (VMEM+VPP) throttles
357+
/// @param[out] o_exceeded_power vector of MCA targets where the estimated power exceeded the maximum allowed
357358
/// @return FAPI2_RC_SUCCESS iff ok
358359
/// @note sets the throttles and power to the worst case
359360
///
360361
fapi2::ReturnCode equalize_throttles (const std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCS> >& i_targets,
361-
const throttle_type i_throttle_type);
362+
const throttle_type i_throttle_type,
363+
std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCA> >& o_exceeded_power);
362364

363365
}//power_thermal
364366
}// mss

src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
8+
/* Contributors Listed Below - COPYRIGHT 2015,2018 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -27,8 +27,8 @@
2727
/// @file p9_mss_bulk_pwr_throttles.C
2828
/// @brief Set the throttle attributes based on a power limit for the dimms on the channel pair
2929
///
30-
// *HWP HWP Owner: Jacob Harvey <jlharvey@us.ibm.com>
31-
// *HWP HWP Backup: Andre A. Marin <aamarin@us.ibm.com>
30+
// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
31+
// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
3232
// *HWP Team: Memory
3333
// *HWP Level: 3
3434
// *HWP Consumed by: FSP:HB
@@ -63,6 +63,7 @@ extern "C"
6363
FAPI_INF("Start p9_mss_bulk_pwr_throttles for %s type throttling",
6464
(( i_throttle_type == mss::throttle_type::THERMAL) ? "THERMAL" : "POWER"));
6565

66+
std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCA> > l_exceeded_power;
6667

6768
for ( const auto& l_mcs : i_targets)
6869
{
@@ -114,8 +115,16 @@ extern "C"
114115
FAPI_TRY(FAPI_ATTR_SET( fapi2::ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT, l_mcs, l_port));
115116
}
116117

117-
//Set all of the throttles to the lowest value per port for performance reasons
118-
FAPI_TRY(mss::power_thermal::equalize_throttles(i_targets, i_throttle_type));
118+
// Set all of the throttles to the lowest value per port for performance reasons
119+
FAPI_TRY(mss::power_thermal::equalize_throttles(i_targets, i_throttle_type, l_exceeded_power));
120+
121+
// Report any MCA that exceeded the max power limit, and return a failing RC if we have any
122+
for (const auto& l_mca : l_exceeded_power)
123+
{
124+
FAPI_ERR("MCA %s estimated power exceeded the maximum allowed", mss::c_str(l_mca) );
125+
fapi2::current_err = fapi2::FAPI2_RC_FALSE;
126+
}
127+
119128
FAPI_INF("End bulk_pwr_throttles");
120129
return fapi2::current_err;
121130

src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
8+
/* Contributors Listed Below - COPYRIGHT 2015,2018 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -30,8 +30,8 @@
3030
/// allowed within a window of M DRAM clocks given the minimum dram data bus utilization.
3131
///
3232

33-
// *HWP HWP Owner: Jacob Harvey <jlharvey@us.ibm.com>
34-
// *HWP HWP Backup: Andre A. Marin <aamarin@us.ibm.com>
33+
// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
34+
// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
3535
// *HWP Team: Memory
3636
// *HWP Level: 3
3737
// *HWP Consumed by: FSP:HB
@@ -71,6 +71,8 @@ extern "C"
7171
{
7272
FAPI_INF("Entering p9_mss_utils_to_throttle");
7373

74+
std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCA> > l_exceeded_power;
75+
7476
for( const auto& l_mcs : i_targets )
7577
{
7678
if (mss::count_dimm(l_mcs) == 0)
@@ -146,8 +148,9 @@ extern "C"
146148
l_n_port) );
147149
}
148150

149-
//equalize throttles to prevent variable performance
150-
FAPI_TRY( mss::power_thermal::equalize_throttles (i_targets, mss::throttle_type::POWER));
151+
// Equalize throttles to prevent variable performance
152+
// Note that we don't do anything with any MCA that exceed the power limit here, as we don't have an input power limit to go from
153+
FAPI_TRY( mss::power_thermal::equalize_throttles (i_targets, mss::throttle_type::POWER, l_exceeded_power));
151154

152155
fapi_try_exit:
153156
return fapi2::current_err;

0 commit comments

Comments
 (0)