Changeset: 68156d38a8c4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=68156d38a8c4
Modified Files:
        monetdb5/mal/mal.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_private.h
Branch: Oct2014
Log Message:

Don't limit incoming queries based on number of cores.
This fixes bug 3665.


diffs (66 lines):

diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -45,7 +45,6 @@ MT_Lock     mal_remoteLock MT_LOCK_INITI
 MT_Lock        mal_profileLock MT_LOCK_INITIALIZER("mal_profileLock");
 MT_Lock     mal_copyLock MT_LOCK_INITIALIZER("mal_copyLock");
 MT_Lock     mal_delayLock MT_LOCK_INITIALIZER("mal_delayLock");
-MT_Sema                mal_parallelism;
 /*
  * Initialization of the MAL context
  * The compiler directive STRUCT_ALIGNED tells that the
@@ -85,11 +84,6 @@ int mal_init(void){
        MT_lock_init( &mal_copyLock, "mal_copyLock");
        MT_lock_init( &mal_delayLock, "mal_delayLock");
 #endif
-       /* "/2" is arbitrarily used / chosen, as on systems with
-        * hyper-threading enabled, using all hardware threads rather than
-        * "only" all physical cores does not necessarily yield a linear
-        * performance benefit */
-       MT_sema_init( &mal_parallelism, (GDKnr_threads > 1 ? GDKnr_threads/2: 
1), "mal_parallelism");
 
        tstAligned();
        MCinit();
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -427,16 +427,9 @@ callMAL(Client cntxt, MalBlkPtr mb, MalS
        int i;
        ValPtr lhs;
        InstrPtr pci = getInstrPtr(mb, 0);
- 
-       /*
-        * Control the level of parallelism. The maximum number of
-        * concurrent MAL plans is determined by an environment
-        * variable. It is initially set equal to the number of cores,
-        * which may be too coarse.
-        */
+
        cntxt->lastcmd= time(0);
        cntxt->active = TRUE;
-       MT_sema_down(&mal_parallelism,"callMAL");
 #ifdef DEBUG_CALLMAL
        mnstr_printf(cntxt->fdout, "callMAL\n");
        printInstruction(cntxt->fdout, mb, 0, pci, LIST_MAL_ALL);
@@ -471,10 +464,8 @@ callMAL(Client cntxt, MalBlkPtr mb, MalS
        case PATcall:
        case CMDcall:
        default:
-               MT_sema_up(&mal_parallelism,"callMAL");
                throw(MAL, "mal.interpreter", RUNTIME_UNKNOWN_INSTRUCTION);
        }
-       MT_sema_up(&mal_parallelism,"callMAL");
        cntxt->active = FALSE;
        if ( ret == MAL_SUCCEED && cntxt->qtimeout && GDKusec()- mb->starttime 
> cntxt->qtimeout)
                throw(MAL, "mal.interpreter", RUNTIME_QRY_TIMEOUT);
diff --git a/monetdb5/mal/mal_private.h b/monetdb5/mal/mal_private.h
--- a/monetdb5/mal/mal_private.h
+++ b/monetdb5/mal/mal_private.h
@@ -70,7 +70,6 @@ extern void showAtoms(stream *fd)             /* us
        __attribute__((__visibility__("hidden")));
 
 extern MT_Lock mal_namespaceLock;
-extern MT_Sema mal_parallelism;
 
 extern int mdbInit(void)
        __attribute__((__visibility__("hidden")));
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to