summaryrefslogtreecommitdiff
path: root/ndb/src/kernel/vm
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-02-10 02:27:37 +0200
committerunknown <monty@mysql.com>2005-02-10 02:27:37 +0200
commit9f04f9d0352e404cf64e044d1c22873595f276d2 (patch)
tree5b603904b731e515c447d53d7843855bfbbe2f8c /ndb/src/kernel/vm
parent70d3ac05d97f7721e564a718ba79afd5eb7eb2cb (diff)
parent0fe1b28b750c12dd500e507f1b688887c9aca227 (diff)
downloadmariadb-git-9f04f9d0352e404cf64e044d1c22873595f276d2.tar.gz
Merge with 4.1
BitKeeper/etc/ignore: auto-union client/mysqltest.c: Auto merged extra/my_print_defaults.c: Auto merged extra/perror.c: Auto merged extra/resolve_stack_dump.c: Auto merged include/help_end.h: Auto merged include/help_start.h: Auto merged myisam/myisamlog.c: Auto merged mysql-test/r/group_by.result: Auto merged mysql-test/r/heap_hash.result: Auto merged BitKeeper/deleted/.del-pack_isam.c~43801f0df7504834: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/user_var.result: Auto merged mysql-test/t/subselect.test: Auto merged ndb/src/kernel/vm/FastScheduler.cpp: Auto merged netware/mysql_test_run.c: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_list.h: Auto merged sql/sql_select.cc: Auto merged netware/BUILD/nwbootstrap: merge: keep local scripts/make_binary_distribution.sh: merge: keep local sql/ha_heap.cc: Trivial merge sql/ha_innodb.cc: Auto merge (Code already existed in 5.0) sql/item_cmpfunc.cc: Simple merge sql/item_func.cc: Simple merge sql/item_row.cc: Simple merge sql/item_strfunc.cc: Simple merge sql/item_subselect.cc: Merge with sanjas optimzation patch, but keep old code withing ifdef as a reference until this is fixed
Diffstat (limited to 'ndb/src/kernel/vm')
-rw-r--r--ndb/src/kernel/vm/FastScheduler.cpp42
1 files changed, 22 insertions, 20 deletions
diff --git a/ndb/src/kernel/vm/FastScheduler.cpp b/ndb/src/kernel/vm/FastScheduler.cpp
index a883882e452..a2d806571fe 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()