summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/mdia
diff options
context:
space:
mode:
authorGlenn Miles <milesg@ibm.com>2019-02-08 15:50:46 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-11 17:12:00 -0500
commit373d8a5fb2853166fae097826a4725633e3b23ba (patch)
treed4dfd3f057a89de782e29433c2d5aa0a469c0d89 /src/usr/diag/mdia
parent8147343269628e7bdab1ab25487e0ada3ace95e6 (diff)
downloadtalos-hostboot-373d8a5fb2853166fae097826a4725633e3b23ba.tar.gz
talos-hostboot-373d8a5fb2853166fae097826a4725633e3b23ba.zip
Run memory training in parallel across centaurs
-Uses a thread pool to do memory training for multiple (up to 4) centaurs at a time. -Also fixes mdiasm.C to set the thread pool count before creating a thread pool instead of using whatever was set before it. Change-Id: I7331bfcd0e1e85af1b825e8ac4e0d1d76924014a RTC: 71239 CQ: SW454787 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71614 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@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> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/diag/mdia')
-rw-r--r--src/usr/diag/mdia/mdiasm.C8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/usr/diag/mdia/mdiasm.C b/src/usr/diag/mdia/mdiasm.C
index 054010e11..bb1c123cf 100644
--- a/src/usr/diag/mdia/mdiasm.C
+++ b/src/usr/diag/mdia/mdiasm.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2018 */
+/* Contributors Listed Below - COPYRIGHT 2012,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -48,6 +48,7 @@
#include <sys/time.h>
#include <p9c_mss_maint_cmds.H>
#include <dimmBadDqBitmapFuncs.H>
+#include <sys/misc.h>
using namespace TARGETING;
using namespace ERRORLOG;
@@ -889,7 +890,10 @@ bool StateMachine::scheduleWorkItem(WorkFlowProperties & i_wfp)
if(!iv_tp)
{
- MDIA_FAST("Starting threadPool...");
+ //create same number of tasks in the pool as there are cpu threads
+ const size_t l_num_tasks = cpu_thread_count();
+ Util::ThreadPoolManager::setThreadCount(l_num_tasks);
+ MDIA_FAST("Starting threadPool with %u tasks...", l_num_tasks);
iv_tp = new Util::ThreadPool<WorkItem>();
iv_tp->start();
}
OpenPOWER on IntegriCloud