On 2013-02-26 14:57, Fabian Groffen wrote:
Any reason for undoing 0f30e64e9bb2?
MALresourceFairness can delay the calling thread for a long time, so you want the enqueue (sema up) to happen first.
On 26-02-2013 14:52:15 +0100, Martin Kersten wrote:
Changeset: 33a1b7bfcb28 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=33a1b7bfcb28 Modified Files: monetdb5/mal/mal_dataflow.c monetdb5/mal/mal_interpreter.c monetdb5/mal/mal_resource.c monetdb5/mal/mal_resource.h Branch: Feb2013 Log Message:
Make MALresource independent of cntxt and mb
diffs (87 lines):
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 @@ -328,13 +328,13 @@ DFLOWworker(void *t) } MT_lock_unset(&flow->flowlock, "MALworker");
+ q_enqueue(flow->done, fe); if ( fnxt == 0) { if (todo->last == 0) profilerHeartbeatEvent("wait"); else - MALresourceFairness(flow->cntxt, flow->mb, usec); + MALresourceFairness(usec); } - q_enqueue(flow->done, fe); } GDKfree(GDKerrbuf); GDKsetbuf(0);
-- Sjoerd Mullender