diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-02-09 15:36:57 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-02-09 15:36:57 +0100 |
commit | 9bb7c34885ff752f6b21f639807a20ed5a903968 (patch) | |
tree | 7a6c0a114df529cc535ceb68da4cefd81bd30cd4 | |
parent | 5c12bc88b9de85f54ab15b22fe57fcc722f0c918 (diff) | |
parent | de92136a8d6a97a8bb7b8506ccfff23bad3224fc (diff) | |
download | mariadb-git-9bb7c34885ff752f6b21f639807a20ed5a903968.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
-rw-r--r-- | ndb/src/kernel/vm/FastScheduler.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/ndb/src/kernel/vm/FastScheduler.cpp b/ndb/src/kernel/vm/FastScheduler.cpp index d05c02360a7..d0b7af27463 100644 --- a/ndb/src/kernel/vm/FastScheduler.cpp +++ b/ndb/src/kernel/vm/FastScheduler.cpp @@ -85,7 +85,7 @@ FastScheduler::activateSendPacked() void FastScheduler::doJob() { - Uint32 init_loopCount = 0; + Uint32 loopCount = 0; Uint32 TminLoops = getBOccupancy() + EXTRA_SIGNALS_PER_DO_JOB; Uint32 TloopMax = (Uint32)globalData.loopMax; if (TminLoops < TloopMax) { @@ -94,10 +94,9 @@ FastScheduler::doJob() if (TloopMax < MIN_NUMBER_OF_SIG_PER_DO_JOB) { TloopMax = MIN_NUMBER_OF_SIG_PER_DO_JOB; }//if + register Signal* signal = getVMSignals(); + register Uint32 tHighPrio= globalData.highestAvailablePrio; do{ - Uint32 loopCount = init_loopCount; - register Uint32 tHighPrio = globalData.highestAvailablePrio; - register Signal* signal = getVMSignals(); while ((tHighPrio < LEVEL_IDLE) && (loopCount < TloopMax)) { // signal->garbage_register(); // To ensure we find bugs quickly @@ -155,24 +154,27 @@ FastScheduler::doJob() }//if loopCount++; }//while - if (globalData.sendPackedActivated == 1) { - Uint32 t1 = theDoJobTotalCounter; - Uint32 t2 = theDoJobCallCounter; - t1 += (loopCount - init_loopCount); - t2++; - theDoJobTotalCounter = t1; - theDoJobCallCounter = t2; - if (t2 == 8192) { - reportDoJobStatistics(t1 >> 13); - theDoJobCallCounter = 0; - theDoJobTotalCounter = 0; - }//if - }//if - init_loopCount = loopCount; sendPacked(); + tHighPrio = globalData.highestAvailablePrio; + if(getBOccupancy() > MAX_OCCUPANCY) + { + if(loopCount != TloopMax) + abort(); + assert( loopCount == TloopMax ); + TloopMax += 512; + } } while ((getBOccupancy() > MAX_OCCUPANCY) || - ((init_loopCount < TloopMax) && - (globalData.highestAvailablePrio < LEVEL_IDLE))); + ((loopCount < TloopMax) && + (tHighPrio < LEVEL_IDLE))); + + theDoJobCallCounter ++; + theDoJobTotalCounter += loopCount; + if (theDoJobCallCounter == 8192) { + reportDoJobStatistics(theDoJobTotalCounter >> 13); + theDoJobCallCounter = 0; + theDoJobTotalCounter = 0; + }//if + }//FastScheduler::doJob() void FastScheduler::sendPacked() |