212 Commits

Author SHA1 Message Date
Markus Makela
49aa23468d Align statistics to cache lines
Aligning the statistics object indices to cache line size reduces the CPU
overhead of gathering the statistics. This allows the statistics to more
accurately measure the polling system without the measurement affecting
the outcome.
2016-12-12 10:48:49 +02:00
Markus Makela
5cb738ae03 Fix minor memory leaks
The main function and monitor creation both leaked a few bytes of memory.
2016-12-09 22:28:35 +02:00
Johan Wikman
12f0886ca2 Call destroyInstance after workers have exited
Router and filter instances cannot be destroyed before all worker
threads have exited. Otherwise there is a risk that data gets deleted
while someone might still be accessing it. Further, since all router
and filter instances are created by the main-thread it is better that
they are deleted by that thread as well (and not by whichever thread
happens to execute service_shutdown()). That will reduce the risk that
some unknown assumptions are violated.
2016-12-09 13:00:14 +02:00
Markus Makela
4ae85dc754 Merge branch '2.0' into develop 2016-12-05 21:19:59 +02:00
Markus Makela
6d7e419ed4 Improve --config-check mode
The configuration checking now detects bad router options. This allows for
better coverage of the configuration with only the --config-check flag.
2016-12-05 13:18:20 +02:00
Markus Makela
2efa862944 Remove listmanager code
The code prevented scaling by imposing global spinlocks for the DCBs and
SESSIONs. Removing this list means that a thread-local list must be taken
into use to replace it.
2016-11-30 10:28:23 +02:00
Markus Makela
51842333d7 Temporarily take out the listmanager from use
The listmanager code uses a global spinlock which might cause problems
with multiple threads.
2016-11-30 10:28:22 +02:00
Markus Makela
076b810c1e Create thread specific zombie queues
Because each thread has their own epoll file descriptor and only one
thread can process a DCB, it makes sense to move to a per thread zombie
queue. This removes one of the last restrictions on scalability.
2016-11-30 10:28:22 +02:00
Markus Makela
691989ff04 Split the service header into internal and external parts
The service header in include/maxscale/ contains the public part of the
service API. These functions can be safely used by the modules.

The internal header located in service/core/maxscale/ is used by the core
to initialize MaxScale at startup or to provide other services in a more
controlled way (the config_runtime, for example).
2016-11-28 14:37:26 +02:00
Markus Makela
6ea4e50f2c Clean up service.h
Most of the service header functions now contain the relevant
documentation. Cleaned up small parts of it and renamed functions to be
more consistent.
2016-11-28 14:37:26 +02:00
Johan Wikman
bddcee6f7e Add space between literal and string macro 2016-11-22 10:40:58 +02:00
Johan Wikman
4dbb68cbfe Compile gateway.c as C++
When C and C++ are mixed in a project, main() should be compiled
as C++ to ensure that all C++ static initializations are performed
properly. That may not be strictly true anymore, depending on the
used compiler and environment, but better to do that to be on the
safe side.
2016-11-22 09:12:36 +02:00