summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-05-23 12:35:08 -0700
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-05-30 09:43:48 -0400
commit0aff9f48c7ea871d49c6966c1fa6a71ba4849558 (patch)
tree3c430ce677c93a7b1ac28eb8edc391781ceb73e0
parent9bace77a615d1066b1dba8da0987c9da612a1436 (diff)
downloadtalos-hostboot-0aff9f48c7ea871d49c6966c1fa6a71ba4849558.tar.gz
talos-hostboot-0aff9f48c7ea871d49c6966c1fa6a71ba4849558.zip
ipmiwatchdog: Limit the number of resets
We send resets after the completion of every istep and in the middle of some of our known long isteps. In some instances during boot, during fast isteps or custom routines, we can send 10 or more resets within the same second. This generates a lot of IPMI traffic and causes the BMC to spend more time processing resets than is needed. Since our timeout is relatively long (120s right now), it should be no issue to limit the number of resets to one reset every 1-2 seconds I've tested this on a zaius machine and it reduced load on the BMC and made clean boots a little faster. Resolves #140 Signed-off-by: William A. Kennington III <wak@google.com> Change-Id: I60d26af082e1ddb29624fc22a0513b47526978d5 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59291 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> 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: William G. Hoffa <wghoffa@us.ibm.com>
-rw-r--r--src/usr/ipmi/ipmiwatchdog.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/usr/ipmi/ipmiwatchdog.C b/src/usr/ipmi/ipmiwatchdog.C
index 3efdbfbb7..2f9f28f74 100644
--- a/src/usr/ipmi/ipmiwatchdog.C
+++ b/src/usr/ipmi/ipmiwatchdog.C
@@ -6,6 +6,7 @@
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2014,2018 */
+/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -39,6 +40,7 @@
#include <ipmi/ipmiwatchdog.H>
#include <ipmi/ipmiif.H>
#include <sys/time.h>
+#include <time.h>
/******************************************************************************/
// Globals/Constants
@@ -104,6 +106,18 @@ errlHndl_t resetWatchDogTimer()
{
errlHndl_t err_ipmi = NULL;
+ // Limit the amount of sent watchdog resets to once per second to make
+ // sure that we don't overload the BMC with resets during quickly
+ // completing ISTEPs. For simplicity we only compare the tv_sec so
+ // the grace period may be almost 2 seconds.
+ static uint64_t last_reset_sec;
+ timespec_t now;
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ if (last_reset_sec + 1 >= now.tv_sec)
+ {
+ return NULL;
+ }
+ last_reset_sec = now.tv_sec;
// reset command does not take any request data
size_t len = 0;
OpenPOWER on IntegriCloud