From 373d8a5fb2853166fae097826a4725633e3b23ba Mon Sep 17 00:00:00 2001 From: Glenn Miles Date: Fri, 8 Feb 2019 15:50:46 -0600 Subject: 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 Reviewed-by: Nicholas E. Bofferding Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/usr/diag/mdia/mdiasm.C | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/usr/diag/mdia') 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 #include #include +#include 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(); iv_tp->start(); } -- cgit v1.2.1