Skip to content
Snippets Groups Projects
Commit 1d7a8911 authored by Alexander van Amesfoort's avatar Alexander van Amesfoort
Browse files

Task #8691: move IOPriority.h to LCS/Common. Maybe we should de-inline funcs...

Task #8691: move IOPriority.h to LCS/Common. Maybe we should de-inline funcs into a .cc, but just make it avail for APERTIF for now. Build tested.
parent e9b75481
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ install(FILES ...@@ -24,6 +24,7 @@ install(FILES
FileLocator.h FileLocator.h
hexdump.h hexdump.h
InputParSet.h InputParSet.h
IOPriority.h
i4complex.h i4complex.h
KVpair.h KVpair.h
lofar_algorithm.h lofar_algorithm.h
......
//# IOPriority.h: define some Linux specific IO priority macro's //# IOPriority.h: Linux specific priority functions
//# Copyright (C) 2011-2013 ASTRON (Netherlands Institute for Radio Astronomy) //# Copyright (C) 2011-2013, 2016
//# ASTRON (Netherlands Institute for Radio Astronomy)
//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands //# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands
//# //#
//# This file is part of the LOFAR software suite. //# This file is part of the LOFAR software suite.
...@@ -18,8 +19,8 @@ ...@@ -18,8 +19,8 @@
//# //#
//# $Id$ //# $Id$
#ifndef LOFAR_STORAGE_IOPRIORITY_H #ifndef LOFAR_COMMON_IOPRIORITY_H
#define LOFAR_STORAGE_IOPRIORITY_H #define LOFAR_COMMON_IOPRIORITY_H
#define IOPRIO_BITS (16) #define IOPRIO_BITS (16)
#define IOPRIO_CLASS_SHIFT (13) #define IOPRIO_CLASS_SHIFT (13)
...@@ -44,6 +45,9 @@ ...@@ -44,6 +45,9 @@
#include <linux/version.h> #include <linux/version.h>
#endif #endif
namespace LOFAR
{
enum { enum {
IOPRIO_WHO_PROCESS = 1, IOPRIO_WHO_PROCESS = 1,
IOPRIO_WHO_PGRP, IOPRIO_WHO_PGRP,
...@@ -172,5 +176,7 @@ inline void lockInMemory(rlim_t memLockLimit = RLIM_INFINITY) ...@@ -172,5 +176,7 @@ inline void lockInMemory(rlim_t memLockLimit = RLIM_INFINITY)
} }
} }
} // namespace LOFAR
#endif #endif
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <Common/StringUtil.h> #include <Common/StringUtil.h>
#include <Common/SystemUtil.h> #include <Common/SystemUtil.h>
#include <Common/Exceptions.h> #include <Common/Exceptions.h>
#include <Common/IOPriority.h>
#include <MessageBus/ToBus.h> #include <MessageBus/ToBus.h>
#include <MessageBus/Protocols/TaskFeedbackDataproducts.h> #include <MessageBus/Protocols/TaskFeedbackDataproducts.h>
#include <Stream/PortBroker.h> #include <Stream/PortBroker.h>
...@@ -50,7 +51,6 @@ ...@@ -50,7 +51,6 @@
#include <CoInterface/SelfDestructTimer.h> #include <CoInterface/SelfDestructTimer.h>
#include "SubbandWriter.h" #include "SubbandWriter.h"
#include "OutputThread.h" #include "OutputThread.h"
#include "IOPriority.h"
using namespace LOFAR; using namespace LOFAR;
using namespace LOFAR::Cobalt; using namespace LOFAR::Cobalt;
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <Common/LofarLogger.h> #include <Common/LofarLogger.h>
#include <Common/StringUtil.h> #include <Common/StringUtil.h>
#include <Common/IOPriority.h>
#include <ApplCommon/StationConfig.h> #include <ApplCommon/StationConfig.h>
#include <ApplCommon/AntField.h> #include <ApplCommon/AntField.h>
#include <CoInterface/Exceptions.h> #include <CoInterface/Exceptions.h>
...@@ -51,7 +52,6 @@ ...@@ -51,7 +52,6 @@
#endif #endif
#include "TBB_Writer.h" #include "TBB_Writer.h"
#include "IOPriority.h"
#define TBB_DEFAULT_BASE_PORT 0x7bb0 // i.e. tbb0 #define TBB_DEFAULT_BASE_PORT 0x7bb0 // i.e. tbb0
#define TBB_DEFAULT_LAST_PORT 0x7bbb // 0x7bbf for NL, 0x7bbb for int'l stations #define TBB_DEFAULT_LAST_PORT 0x7bbb // 0x7bbf for NL, 0x7bbb for int'l stations
...@@ -516,9 +516,9 @@ int main(int argc, char* argv[]) ...@@ -516,9 +516,9 @@ int main(int argc, char* argv[])
// We don't run alone, so try to increase the QoS we get from the OS to decrease the chance of data loss. // We don't run alone, so try to increase the QoS we get from the OS to decrease the chance of data loss.
if (parset.settings.realTime) { if (parset.settings.realTime) {
setIOpriority(); // reqs CAP_SYS_NICE LOFAR::setIOpriority(); // reqs CAP_SYS_NICE
setRTpriority(); // reqs CAP_SYS_ADMIN LOFAR::setRTpriority(); // reqs CAP_SYS_ADMIN
lockInMemory(); // reqs CAP_IPC_LOCK LOFAR::lockInMemory(); // reqs CAP_IPC_LOCK
} }
LOFAR::Cobalt::StationMetaDataMap stMdMap(getExternalStationMetaData(parset, args.staticMetaDataDir)); LOFAR::Cobalt::StationMetaDataMap stMdMap(getExternalStationMetaData(parset, args.staticMetaDataDir));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment