Tweaks PAPB polling #533

Merged
muellerr merged 32 commits from tweaks_papb_polling into develop 2023-03-28 22:18:27 +02:00
2 changed files with 11 additions and 7 deletions
Showing only changes of commit bc72f59abb - Show all commits

View File

@ -20,13 +20,15 @@ ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) {
if (not busy) {
TaskFactory::delayTask(100);
} else if (dumpContext.vcBusyDuringDump) {
TaskFactory::delayTask(10);
TaskFactory::delayTask(20);
} else if (fileHasSwapped) {
TaskFactory::delayTask(10);
} else if (dumpContext.packetWasDumped and dumpContext.numberOfDumpedPackets % 50 == 0) {
TaskFactory::delayTask(10);
TaskFactory::delayTask(20);
} else if (dumpContext.packetWasDumped and
dumpContext.numberOfDumpedPackets - dumpContext.bytesDumpedAtLastDelay >= 2048) {
dumpContext.bytesDumpedAtLastDelay = dumpContext.dumpedBytes;
TaskFactory::delayTask(20);
} else {
// TaskFactory::delayTask(5);
TaskFactory::delayTask(10);
}
// else if(dumpContext.numberOfDumpedPackets % 20 == 0) {
// Manual load management because I don't know what the scheduler is doing..

View File

@ -14,11 +14,13 @@ class TmStoreTaskBase : public SystemObject {
dumpedBytes = 0;
vcBusyDuringDump = false;
packetWasDumped = false;
bytesDumpedAtLastDelay = 0;
ptmeBusyCounter = 0;
}
const Event eventIfDone;
uint32_t numberOfDumpedPackets = 0;
uint32_t dumpedBytes = 0;
size_t numberOfDumpedPackets = 0;
size_t bytesDumpedAtLastDelay = 0;
size_t dumpedBytes = 0;
uint32_t ptmeBusyCounter = 0;
bool packetWasDumped = false;
bool vcBusyDuringDump = false;