Re: [Monetdb-developers] MonetDB: default - Revert the changes of May 04 to recover perfo...
In case the changes of May 04 indeed caused the reported performance degradation, I assume this checkin should then also be back-ported to the Jun2010 branch that was created on May 06 and hence also contains the problematic changes of May 04, right? Once confirmed and I can back-port this checkin. Stefan On Sat, May 08, 2010 at 08:30:35PM +0200, Martin.Kersten@cwi.nl wrote:
Changeset: e9c1206c5008 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e9c1206c5008 Modified Files: MonetDB5/src/mal/mal_interpreter.mx clients/src/python/test/capabilities.py clients/src/python/test/dbapi20.py geom/src/sql/geom.sql Branch: default Log Message:
Revert the changes of May 04 to recover performance.
diffs (76 lines):
diff -r dd777c76a3f9 -r e9c1206c5008 MonetDB5/src/mal/mal_interpreter.mx --- a/MonetDB5/src/mal/mal_interpreter.mx Sat May 08 09:16:12 2010 +0200 +++ b/MonetDB5/src/mal/mal_interpreter.mx Sat May 08 20:30:23 2010 +0200 @@ -341,7 +341,7 @@
/* pass the new debug mode to the caller */ if (stk->cmd && env && stk->cmd!='f') env->cmd = stk->cmd; - if ( garbageControl(getInstrPtr(mb,0)) ) + if ( !stk->keepAlive && garbageControl(getInstrPtr(mb,0)) ) garbageCollector(cntxt, mb,stk, env != stk); @:endProfile(stk)@ return ret; @@ -361,15 +361,19 @@ MalStkPtr stk, MalStkPtr env, InstrPtr pcicaller) { str ret; + int keepAlive;
if (stk == NULL) throw(MAL, "mal.interpreter", MAL_STACK_FAIL); + keepAlive = stk->keepAlive; if(env && stk && stk->cmd!='f') stk->cmd = env->cmd ;
ret = runMALsequence(cntxt, mb, startpc, stoppc, stk, env, pcicaller);
/* pass the new debug mode to the caller */ if (env && stk->cmd!='f') env->cmd = stk->cmd; + if ( keepAlive == 0 && garbageControl(getInstrPtr(mb,0)) ) + garbageCollector(cntxt, mb,stk,env!=stk); return ret; } @- @@ -1336,7 +1340,6 @@ { DataFlow flow = NULL; str ret = MAL_SUCCEED; - int keepalive;
#ifdef DEBUG_FLOW stream_printf(GDKstdout, "runMALdataflow for block %d - %d\n", startpc,stoppc); @@ -1387,9 +1390,6 @@ flow->stop = stoppc; flow->mb = mb; flow->stk = stk; - /* avoid the garbage collection call at the end of interpreter loop */ - keepalive = flow->stk->keepAlive; - flow->stk->keepAlive= TRUE;
flow->status = (char*) GDKzalloc((stoppc-startpc+1)); flow->blocked = (char*) GDKzalloc(sizeof(char)*mb->vtop); @@ -1397,7 +1397,6 @@ mal_unset_lock(mal_contextLock, "runMALdataflow");
ret = DFLOWscheduler(flow); - flow->stk->keepAlive= keepalive; GDKfree(flow->status); GDKfree(flow->blocked); GDKfree(flow->inuse); @@ -1764,7 +1763,7 @@ sbackup[i]= 0; backup[i]= 0; garbage[i]= -1; - if (stk->stk[getArg(pci,i)].vtype == TYPE_bat && getEndOfLife(mb,getArg(pci,i)) == stkpc && isNotUsedIn(pci,i+1,getArg(pci,i)) && stk->keepAlive == 0){ + if (stk->stk[getArg(pci,i)].vtype == TYPE_bat && getEndOfLife(mb,getArg(pci,i)) == stkpc && isNotUsedIn(pci,i+1,getArg(pci,i)) ){ garbage[i]= getArg(pci,i); #ifdef DEBUG_GC stream_printf(GDKstdout,"GC %d %s prep\n",getArg(pci,i), getArgName(mb,pci,i)); @@ -2345,8 +2344,6 @@ int k; ValPtr v;
- if ( stk->keepAlive) - return; #ifdef STACKTRACE stream_printf(cntxt->fdout,"#--->stack before garbage collector\n"); printStack(cntxt->fdout,mb,stk,0); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4199 |
Stefan Manegold wrote:
In case the changes of May 04 indeed caused the reported performance degradation, I assume this checkin should then also be back-ported to the Jun2010 branch that was created on May 06 and hence also contains the problematic changes of May 04, right? yes.
Once confirmed and I can back-port this checkin.
Stefan
On Sat, May 08, 2010 at 08:30:35PM +0200, Martin.Kersten@cwi.nl wrote:
Changeset: e9c1206c5008 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e9c1206c5008 Modified Files: MonetDB5/src/mal/mal_interpreter.mx clients/src/python/test/capabilities.py clients/src/python/test/dbapi20.py geom/src/sql/geom.sql Branch: default Log Message:
Revert the changes of May 04 to recover performance.
diffs (76 lines):
diff -r dd777c76a3f9 -r e9c1206c5008 MonetDB5/src/mal/mal_interpreter.mx --- a/MonetDB5/src/mal/mal_interpreter.mx Sat May 08 09:16:12 2010 +0200 +++ b/MonetDB5/src/mal/mal_interpreter.mx Sat May 08 20:30:23 2010 +0200 @@ -341,7 +341,7 @@
/* pass the new debug mode to the caller */ if (stk->cmd && env && stk->cmd!='f') env->cmd = stk->cmd; - if ( garbageControl(getInstrPtr(mb,0)) ) + if ( !stk->keepAlive && garbageControl(getInstrPtr(mb,0)) ) garbageCollector(cntxt, mb,stk, env != stk); @:endProfile(stk)@ return ret; @@ -361,15 +361,19 @@ MalStkPtr stk, MalStkPtr env, InstrPtr pcicaller) { str ret; + int keepAlive;
if (stk == NULL) throw(MAL, "mal.interpreter", MAL_STACK_FAIL); + keepAlive = stk->keepAlive; if(env && stk && stk->cmd!='f') stk->cmd = env->cmd ;
ret = runMALsequence(cntxt, mb, startpc, stoppc, stk, env, pcicaller);
/* pass the new debug mode to the caller */ if (env && stk->cmd!='f') env->cmd = stk->cmd; + if ( keepAlive == 0 && garbageControl(getInstrPtr(mb,0)) ) + garbageCollector(cntxt, mb,stk,env!=stk); return ret; } @- @@ -1336,7 +1340,6 @@ { DataFlow flow = NULL; str ret = MAL_SUCCEED; - int keepalive;
#ifdef DEBUG_FLOW stream_printf(GDKstdout, "runMALdataflow for block %d - %d\n", startpc,stoppc); @@ -1387,9 +1390,6 @@ flow->stop = stoppc; flow->mb = mb; flow->stk = stk; - /* avoid the garbage collection call at the end of interpreter loop */ - keepalive = flow->stk->keepAlive; - flow->stk->keepAlive= TRUE;
flow->status = (char*) GDKzalloc((stoppc-startpc+1)); flow->blocked = (char*) GDKzalloc(sizeof(char)*mb->vtop); @@ -1397,7 +1397,6 @@ mal_unset_lock(mal_contextLock, "runMALdataflow");
ret = DFLOWscheduler(flow); - flow->stk->keepAlive= keepalive; GDKfree(flow->status); GDKfree(flow->blocked); GDKfree(flow->inuse); @@ -1764,7 +1763,7 @@ sbackup[i]= 0; backup[i]= 0; garbage[i]= -1; - if (stk->stk[getArg(pci,i)].vtype == TYPE_bat && getEndOfLife(mb,getArg(pci,i)) == stkpc && isNotUsedIn(pci,i+1,getArg(pci,i)) && stk->keepAlive == 0){ + if (stk->stk[getArg(pci,i)].vtype == TYPE_bat && getEndOfLife(mb,getArg(pci,i)) == stkpc && isNotUsedIn(pci,i+1,getArg(pci,i)) ){ garbage[i]= getArg(pci,i); #ifdef DEBUG_GC stream_printf(GDKstdout,"GC %d %s prep\n",getArg(pci,i), getArgName(mb,pci,i)); @@ -2345,8 +2344,6 @@ int k; ValPtr v;
- if ( stk->keepAlive) - return; #ifdef STACKTRACE stream_printf(cntxt->fdout,"#--->stack before garbage collector\n"); printStack(cntxt->fdout,mb,stk,0); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
On 09-05-2010 00:36:06 +0200, Martin Kersten wrote:
Stefan Manegold wrote:
In case the changes of May 04 indeed caused the reported performance degradation, I assume this checkin should then also be back-ported to the Jun2010 branch that was created on May 06 and hence also contains the problematic changes of May 04, right? yes.
please use the "hg backout" command to revert the exact changeset.
participants (3)
-
Fabian Groffen
-
Martin Kersten
-
Stefan Manegold