Changeset: c7398d99aa3b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c7398d99aa3b
Modified Files:
MonetDB5/src/mal/mal_interpreter.mx
Branch: default
Log Message:
Don't keep an instruction you want to ignore
First return an instruction to the queue before waiting for
the next one. Otherwise, you unnecessarily block progress.
diffs (31 lines):
diff -r 6e229768e78d -r c7398d99aa3b MonetDB5/src/mal/mal_interpreter.mx
--- a/MonetDB5/src/mal/mal_interpreter.mx Mon May 17 23:04:06 2010 +0200
+++ b/MonetDB5/src/mal/mal_interpreter.mx Tue May 18 09:02:09 2010 +0200
@@ -829,7 +829,7 @@
if (memorypool <= 0 && memoryclaims == 0)
memorypool = (lng) (MEMORY_THRESHOLD * monet_memory);
- if ( argclaim + retclaim >= 0 ) {
+ if ( argclaim + retclaim > 0 ) {
if (memoryclaims == 0 || memorypool - memoryused > argclaim +
retclaim -hotclaim){
memorypool -= (argclaim + retclaim);
memoryclaims ++;
@@ -1043,7 +1043,7 @@
break;
}
/* if we claim only part of memory, then let's
wait */
- if (argclaim + retclaim -hotclaim < (lng)
(MEMORY_THRESHOLD * monet_memory / memoryclaims))
+ if (argclaim + retclaim -hotclaim < (lng)
(monet_memory / (memoryclaims+1)))
continue;
/* re-schedule instructions that require a lot
of memory for postponed execution */
PARDEBUG {
@@ -1122,8 +1122,8 @@
while(task) {
fs = (FlowStep)q_dequeue(task->todo);
if ( fs == oldfs){
+ q_requeue(task->todo,fs);
MT_sleep_ms(10);
- q_requeue(task->todo,fs);
oldfs = 0; /* don't escape it always */
continue;
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list