diff --git a/RTCP/IONProc/src/CommandServer.cc b/RTCP/IONProc/src/CommandServer.cc index 8252afe3fa351bdc312c54cd20650b01a6e2b134..99f8cd61e415ef241953be77183ef97929a03972 100644 --- a/RTCP/IONProc/src/CommandServer.cc +++ b/RTCP/IONProc/src/CommandServer.cc @@ -27,6 +27,7 @@ #include <GlobalVars.h> #include <Job.h> #include <JobQueue.h> +#include <Scheduling.h> #include <Stream/SocketStream.h> #include <string> @@ -77,6 +78,11 @@ void CommandServer::handleCommand(const std::string &command) void CommandServer::commandMaster() { +#if defined HAVE_BGP_ION + //doNotRunOnCore0(); + runOnCore0(); +#endif + std::vector<SmartPtr<MultiplexedStream> > ionStreams(nrPsets); for (unsigned ion = 1; ion < nrPsets; ion ++) diff --git a/RTCP/IONProc/src/ControlPhase3Cores.cc b/RTCP/IONProc/src/ControlPhase3Cores.cc index 88c231c5276be832f593afd3e433070ea280f2d2..088169558a69149b72ad3231b632c64622b9886e 100644 --- a/RTCP/IONProc/src/ControlPhase3Cores.cc +++ b/RTCP/IONProc/src/ControlPhase3Cores.cc @@ -26,6 +26,7 @@ //# Includes #include <ControlPhase3Cores.h> #include <Interface/CN_Command.h> +#include <Scheduling.h> #include <boost/format.hpp> using boost::format; @@ -84,6 +85,11 @@ void ControlPhase3Cores::addIterations(unsigned count) void ControlPhase3Cores::mainLoop() { +#if defined HAVE_BGP_ION + //doNotRunOnCore0(); + runOnCore0(); +#endif + unsigned block = itsFirstBlock; unsigned nrPhaseThreeComputeCores = itsPhaseThreeStreams.size(); unsigned currentPhaseThreeComputeCore = block % nrPhaseThreeComputeCores; diff --git a/RTCP/IONProc/src/Delays.cc b/RTCP/IONProc/src/Delays.cc index 4ba7a9332f6bda5344464326842036450114da2d..67fcd3a54f1a725c93f269d89a6a9ce9126bd92e 100644 --- a/RTCP/IONProc/src/Delays.cc +++ b/RTCP/IONProc/src/Delays.cc @@ -24,6 +24,7 @@ #include <lofar_config.h> #include <Delays.h> +#include <Scheduling.h> #include <Common/LofarLogger.h> #include <Common/PrettyUnits.h> #include <Interface/Exceptions.h> @@ -132,6 +133,10 @@ void Delays::init() void Delays::mainLoop() { +#if defined HAVE_BGP_ION + doNotRunOnCore0(); +#endif + LOG_DEBUG("Delay compensation thread running"); init(); diff --git a/RTCP/IONProc/src/InputThread.cc b/RTCP/IONProc/src/InputThread.cc index 1939b95a20250035b3d19294612bf7f886375b73..b87e2ae3120e828a040f5c122e782486f3c70577 100644 --- a/RTCP/IONProc/src/InputThread.cc +++ b/RTCP/IONProc/src/InputThread.cc @@ -75,7 +75,7 @@ template <typename SAMPLE_TYPE> InputThread<SAMPLE_TYPE>::~InputThread() template <typename SAMPLE_TYPE> void InputThread<SAMPLE_TYPE>::mainLoop() { #if 1 && defined HAVE_BGP_ION - if (itsArgs.threadID == 0) + if (0 && itsArgs.threadID == 0) runOnCore0(); else doNotRunOnCore0(); diff --git a/RTCP/IONProc/src/Job.cc b/RTCP/IONProc/src/Job.cc index f2e92648347bb9025ffc68b64ab9a0ed16d28169..e87f9fe65eb586532fd004d30809c51cdc09959b 100644 --- a/RTCP/IONProc/src/Job.cc +++ b/RTCP/IONProc/src/Job.cc @@ -30,6 +30,7 @@ #include <Interface/RSPTimeStamp.h> #include <InputSection.h> #include <ION_Allocator.h> +#include <Scheduling.h> #include <GlobalVars.h> #include <Job.h> #include <OutputSection.h> @@ -378,6 +379,10 @@ void Job::claimResources() void Job::jobThread() { +#if defined HAVE_BGP_ION + doNotRunOnCore0(); +#endif + if (myPsetNumber == 0 || itsHasPhaseOne || itsHasPhaseTwo || itsHasPhaseThree) { createCNstreams(); createIONstreams(); diff --git a/RTCP/IONProc/src/LogThread.cc b/RTCP/IONProc/src/LogThread.cc index fa4a780d48e05b04a09ee8a2297f20a44aced21a..4b3a123f33b7a6b2e5f40e1f5bc2758e9ddd9308 100644 --- a/RTCP/IONProc/src/LogThread.cc +++ b/RTCP/IONProc/src/LogThread.cc @@ -137,6 +137,7 @@ void LogThread::writeCPUstats(std::stringstream &str) void LogThread::mainLoop() { #if defined HAVE_BGP_ION + //doNotRunOnCore0(); runOnCore0(); readCPUstats(previousLoad); gettimeofday(&previousTimeval,0); diff --git a/RTCP/IONProc/src/OutputThread.cc b/RTCP/IONProc/src/OutputThread.cc index c4cc4857b2a9afab6cf2efd24f2d3fc094b3999c..79bf6bb8ffa1627d583e013ce89cc2aeed3765b3 100644 --- a/RTCP/IONProc/src/OutputThread.cc +++ b/RTCP/IONProc/src/OutputThread.cc @@ -59,7 +59,8 @@ void OutputThread::mainLoop() { #if defined HAVE_BGP_ION doNotRunOnCore0(); - nice(19); + //nice(19); + //runOnCore0(); #endif try { diff --git a/RTCP/IONProc/src/OutputThread.h b/RTCP/IONProc/src/OutputThread.h index 1ab352ca6f6d8321edcf9fa5ec6554b7dde7df8d..2a31fadab2ae338f72f1da60bc87402315dd79ae 100644 --- a/RTCP/IONProc/src/OutputThread.h +++ b/RTCP/IONProc/src/OutputThread.h @@ -46,7 +46,7 @@ class OutputThread void start(); - static const unsigned maxSendQueueSize = 3; // use 2 if you run out of memory, but test carefully to avoid data loss + static const unsigned maxSendQueueSize = 5; // use 2 if you run out of memory, but test carefully to avoid data loss Queue<SmartPtr<StreamableData> > itsFreeQueue, itsSendQueue; diff --git a/RTCP/IONProc/src/PLCClient.cc b/RTCP/IONProc/src/PLCClient.cc index 15d3cd45882a8e2be364405700cbc1e663ae071e..52045b44a08d1688616b7327ae118778c8da3e6b 100644 --- a/RTCP/IONProc/src/PLCClient.cc +++ b/RTCP/IONProc/src/PLCClient.cc @@ -24,6 +24,7 @@ #include <lofar_config.h> #include <PLCClient.h> +#include <Scheduling.h> #include <Common/DataConvert.h> #include <Common/DataFormat.h> #include <Interface/Exceptions.h> @@ -353,7 +354,13 @@ void PLCClient::recvCmd( PCCmd &cmd, string &options ) const // inner control structure (PLC message handling): // LCS/ACC/PLC/src/ProcControlServer.cc -void PLCClient::mainLoop() { +void PLCClient::mainLoop() +{ +#if defined HAVE_BGP_ION + //doNotRunOnCore0(); + runOnCore0(); +#endif + bool running = false; bool pausing = false; diff --git a/RTCP/IONProc/src/SSH.cc b/RTCP/IONProc/src/SSH.cc index f95556d47f9dd75418e5d8da8fe79838a777f35a..600e4c6f65ac3042c8bd4b8641c3e63250b9d896 100644 --- a/RTCP/IONProc/src/SSH.cc +++ b/RTCP/IONProc/src/SSH.cc @@ -34,6 +34,7 @@ #include <vector> #ifdef HAVE_LIBSSH2 +#include <Scheduling.h> #include <sstream> #include <sys/select.h> #include <Common/lofar_string.h> @@ -203,6 +204,12 @@ bool SSHconnection::waitsocket( FileDescriptorBasedStream &sock ) void SSHconnection::commThread() { +#if defined HAVE_BGP_ION + //doNotRunOnCore0(); + runOnCore0(); + //nice(19); +#endif + SocketStream sock( itsHostName, 22, SocketStream::TCP, SocketStream::Client ); LOG_DEBUG_STR( itsLogPrefix << "Connected" ); diff --git a/RTCP/IONProc/src/StreamMultiplexer.cc b/RTCP/IONProc/src/StreamMultiplexer.cc index a68b41974b7240934951a578fb18c3a04283cf89..b17ff5c5dd47bf2695898b1b26f2dad0494e09b8 100644 --- a/RTCP/IONProc/src/StreamMultiplexer.cc +++ b/RTCP/IONProc/src/StreamMultiplexer.cc @@ -23,6 +23,7 @@ #include <lofar_config.h> #include <StreamMultiplexer.h> +#include <Scheduling.h> #include <Common/Thread/Cancellation.h> #include <Common/LofarLogger.h> @@ -113,6 +114,10 @@ void StreamMultiplexer::registerChannel(MultiplexedStream *stream, unsigned chan void StreamMultiplexer::receiveThread() { +#if defined HAVE_BGP_ION + doNotRunOnCore0(); +#endif + while (1) { RequestMsg msg;