Commit 74cb0e0d authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

GlobalCPUAffinityMgr: skip processing if Lima has enough CPUs to run

parent e7934a33
......@@ -5,7 +5,6 @@ c_compiler:
cxx_compiler:
- vs2017 # [win]
python:
- 2.7 # [linux]
- 3.6
- 3.7
# This differs from target_platform in that it determines what subdir the compiler
......
......@@ -1637,8 +1637,18 @@ void GlobalCPUAffinityMgr::recvFinished()
DEB_MEMBER_FUNCT();
AutoMutex l = lock();
if (!m_proc_finished)
if (!m_proc_finished) {
m_state = Ready;
} else {
PoolThreadMgr& pool_thread_mgr = PoolThreadMgr::get();
int nb_threads = pool_thread_mgr.getNumberOfThread();
int nb_cpus = m_curr.lima.getNbCPUs();
DEB_TRACE() << DEB_VAR2(nb_threads, nb_cpus);
if (nb_threads == nb_cpus) {
DEB_ALWAYS() << "Skipping processing";
m_state = Ready;
}
}
if (m_state == Ready)
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment