Changeset: 3aca8e0330f8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3aca8e0330f8 Modified Files: monetdb5/mal/mal.h monetdb5/mal/mal_dataflow.c monetdb5/mal/mal_instruction.h Branch: default Log Message:
Remove some old cruft. Wrap the hot potatoe, because it seems not be so effective with the new re-order optimizer. diffs (90 lines): diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -131,7 +131,6 @@ typedef struct VARRECORD { used:1, disabled:1; short depth; /* scope block depth, set to -1 if not used */ - short worker; /* thread id of last worker producing it */ ValRecord value; int declared; /* pc index when it was first assigned */ int updated; /* pc index when it was first updated */ diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c --- a/monetdb5/mal/mal_dataflow.c +++ b/monetdb5/mal/mal_dataflow.c @@ -327,9 +327,8 @@ DFLOWworker(void *T) struct worker *t = (struct worker *) T; DataFlow flow; FlowEvent fe = 0, fnxt = 0; - int tid = THRgettid(); str error = 0; - int i,last; + int i; lng claim; Client cntxt; InstrPtr p; @@ -400,10 +399,6 @@ DFLOWworker(void *T) error = runMALsequence(flow->cntxt, flow->mb, fe->pc, fe->pc + 1, flow->stk, 0, 0); /* release the memory claim */ MALadmission_release(flow->cntxt, flow->mb, flow->stk, p, claim); - /* update the numa information. keep the thread-id producing the value */ - p= getInstrPtr(flow->mb,fe->pc); - for( i = 0; i < p->argc; i++) - setVarWorker(flow->mb,getArg(p,i),tid); MT_lock_set(&flow->flowlock); fe->state = DFLOWwrapup; @@ -438,21 +433,25 @@ DFLOWworker(void *T) if( footprint > fe->maxclaim) fe->maxclaim = footprint; } } - MT_lock_set(&flow->flowlock); - - for (last = fe->pc - flow->start; last >= 0 && (i = flow->nodes[last]) > 0; last = flow->edges[last]) - if (flow->status[i].state == DFLOWpending && - flow->status[i].blocks == 1) { - flow->status[i].state = DFLOWrunning; - flow->status[i].blocks = 0; - flow->status[i].hotclaim = fe->hotclaim; - flow->status[i].argclaim += fe->hotclaim; - if( flow->status[i].maxclaim < fe->maxclaim) - flow->status[i].maxclaim = fe->maxclaim; - fnxt = flow->status + i; - break; - } - MT_lock_unset(&flow->flowlock); +#define HOTPOTATOE +#ifdef HOTPOTATOE + /* HOT potatoe choice */ + MT_lock_set(&flow->flowlock); + int last = 0; + for (last = fe->pc - flow->start; last >= 0 && (i = flow->nodes[last]) > 0; last = flow->edges[last]) + if (flow->status[i].state == DFLOWpending && + flow->status[i].blocks == 1) { + flow->status[i].state = DFLOWrunning; + flow->status[i].blocks = 0; + flow->status[i].hotclaim = fe->hotclaim; + flow->status[i].argclaim += fe->hotclaim; + if( flow->status[i].maxclaim < fe->maxclaim) + flow->status[i].maxclaim = fe->maxclaim; + fnxt = flow->status + i; + break; + } + MT_lock_unset(&flow->flowlock); +#endif q_enqueue(flow->done, fe); if ( fnxt == 0 && malProfileMode) { diff --git a/monetdb5/mal/mal_instruction.h b/monetdb5/mal/mal_instruction.h --- a/monetdb5/mal/mal_instruction.h +++ b/monetdb5/mal/mal_instruction.h @@ -93,9 +93,6 @@ mal_export char* getVarName(MalBlkPtr mb #define setVarEolife(M,I,X) ((M)->var[I].eolife = X ) #define getVarEolife(M,I) ((M)->var[I].eolife) -#define setVarWorker(M,I,S) ((M)->var[I].worker = S) -#define getVarWorker(M,I) ((M)->var[I].worker) - #define setVarScope(M,I,S) ((M)->var[I].depth = S) #define getVarScope(M,I) ((M)->var[I].depth) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list