![]() |
Project
|
#include <TimesliceIndex.h>
Classes | |
struct | ActionSpec |
The result of the replacing the LRU slot with a new one. More... | |
struct | OldestInputInfo |
struct | OldestOutputInfo |
Public Types | |
enum struct | BackpressureOp { Wait , DropAncient , DropRecent } |
What to do when there is backpressure. More... | |
enum struct | ActionTaken { ReplaceUnused , ReplaceObsolete , Wait , DropInvalid , DropObsolete } |
The outcome for the processing of a given timeslot. More... | |
Static Public Attributes | |
static constexpr ServiceKind | service_kind = ServiceKind::Global |
This class keeps the information relative to a given slot in the cache, in particular which variables are associated to it (and indirectly which timeslice which is always mapped to the variable 0) and wether we should consider the slot dirty (e.g. up for reprocessing by the completion policy). It also provides helpers to decide which slot to reuse in case we are under overload.
Definition at line 35 of file TimesliceIndex.h.
|
strong |
The outcome for the processing of a given timeslot.
Definition at line 50 of file TimesliceIndex.h.
|
strong |
What to do when there is backpressure.
Enumerator | |
---|---|
Wait | |
DropAncient | |
DropRecent |
Definition at line 43 of file TimesliceIndex.h.
o2::framework::TimesliceIndex::TimesliceIndex | ( | size_t | maxLanes, |
std::vector< InputChannelInfo > & | channels | ||
) |
Definition at line 20 of file TimesliceIndex.cxx.
void o2::framework::TimesliceIndex::associate | ( | TimesliceId | timestamp, |
TimesliceSlot | slot | ||
) |
Associated the timestamp to the given slot. Notice that now the information about the timeslot to associate needs to be determined outside the TimesliceIndex.
Definition at line 33 of file TimesliceIndex.cxx.
bool o2::framework::TimesliceIndex::didReceiveData | ( | ) | const |
Definition at line 121 of file TimesliceIndex.cxx.
InputChannelInfo const & o2::framework::TimesliceIndex::getChannelInfo | ( | ChannelIndex | channel | ) | const |
Definition at line 234 of file TimesliceIndex.cxx.
OldestInputInfo o2::framework::TimesliceIndex::getOldestPossibleInput | ( | ) | const |
Find the lowest value for the timeslices in this instance. This is the minimum between all the per channel oldest possible timeslices and the oldest possible timeslice in-fly which is still dirty.
OldestOutputInfo o2::framework::TimesliceIndex::getOldestPossibleOutput | ( | ) | const |
|
inline |
Given a slot,
|
inline |
Given a slot,
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Publish a slot to be sent via metrics.
std::tuple< TimesliceIndex::ActionTaken, TimesliceSlot > o2::framework::TimesliceIndex::replaceLRUWith | ( | data_matcher::VariableContext & | newContext, |
TimesliceId | timestamp | ||
) |
Find the LRU entry in the cache and replace it with newContext slot is filled with the slot used to hold the context, if applicable. timestamp must be provided to select the correct lane, in case of pipelining
Definition at line 68 of file TimesliceIndex.cxx.
|
inline |
Mark all the cachelines as invalid, e.g. due to an out of band event.
auto o2::framework::TimesliceIndex::reset | ( | ) | -> void |
The actual channel id of the oldest input.
Definition at line 239 of file TimesliceIndex.cxx.
void o2::framework::TimesliceIndex::resize | ( | size_t | s | ) |
Definition at line 26 of file TimesliceIndex.cxx.
TimesliceIndex::OldestInputInfo o2::framework::TimesliceIndex::setOldestPossibleInput | ( | TimesliceId | timeslice, |
ChannelIndex | channel | ||
) |
Set the older possible input per channel
Definition at line 141 of file TimesliceIndex.cxx.
|
inline |
TimesliceIndex::OldestOutputInfo o2::framework::TimesliceIndex::updateOldestPossibleOutput | ( | bool | rewinded | ) |
Definition at line 195 of file TimesliceIndex.cxx.
bool o2::framework::TimesliceIndex::validateSlot | ( | TimesliceSlot | slot, |
TimesliceId | currentOldest | ||
) |
Validate that the slot slot is still not older than currentOldest
Definition at line 181 of file TimesliceIndex.cxx.
|
staticconstexpr |
TimesliceIndex is threadsafe because it's accessed only by the DataRelayer.
Definition at line 40 of file TimesliceIndex.h.