summaryrefslogtreecommitdiffstats
path: root/runtime/wtp.c
Commit message (Collapse)AuthorAgeFilesLines
* improved imudp real-time scheduling support & bugfixDražen Kačar2011-01-101-0/+6
| | | | | | | The original code had quite some issues, which are fixed by this commit. Also we do more error checking now. Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
* fixed race conditions during queue shutdown (DA case, disks active)Rainer Gerhards2010-05-181-6/+11
|
* added new cancel-reduced action thread termination methodRainer Gerhards2010-05-171-0/+12
| | | | | | | | We now manage to cancel threads that block inside a retry loop to terminate without the need to cancel the thread. Avoiding cancellation helps keep the system complexity minimal and thus provides for better stability. This also solves some issues with improper shutdown when inside an action retry loop.
* adapted new atomic instruction emulation to v5 engineRainer Gerhards2010-04-271-11/+16
| | | | code did not compile after merge from v4
* Merge branch 'v4-devel' into masterRainer Gerhards2010-04-271-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: runtime/Makefile.am runtime/atomic.h runtime/queue.c runtime/queue.h runtime/wti.c runtime/wti.h runtime/wtp.c runtime/wtp.h
| * bugfix: problems with atomic operations emulationRainer Gerhards2010-04-271-1/+17
| | | | | | | | | | | | replaced atomic operation emulation with new code. The previous code seemed to have some issue and also limited concurrency severely. The whole atomic operation emulation has been rewritten.
| * removed some complier warningsRainer Gerhards2010-04-211-2/+4
| |
| * Merge branch 'v4-stable' into v4-betaRainer Gerhards2009-10-211-2/+0
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html plugins/imrelp/imrelp.c
| | * Merge branch 'v3-stable' into v4-stableRainer Gerhards2009-10-201-2/+0
| | |\
| | | * bugfix: potential hang condition on queue shutdownRainer Gerhards2009-10-201-2/+0
| | | |
* | | | cleanup of some compiler warningsRainer Gerhards2010-04-211-2/+4
| | | |
* | | | moved DNS resolution code out of imudp and into the backend processingRainer Gerhards2009-11-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most importantly, DNS resolution now never happens if the resolved name is not required. Note that this applies to imudp - for the other inputs, DNS resolution almost comes for free, so we do not do it there. However, the new method has been implemented in a generic way and as such may also be used by other modules in the future.
* | | | some cleanupRainer Gerhards2009-10-271-7/+3
| | | |
* | | | addressed some race issues during queue shutdownRainer Gerhards2009-10-261-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | these occured in very unusual scenarios where we had a DA-queue running in parallel and very lengthy actions. Then, in some situations, the shutdown could hang. The code needs some addition lab time, but is believed to be much better than any previous version.
* | | | enhanced test environment (including testbench)Rainer Gerhards2009-10-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support for enhancing probability of memory addressing failure by using non-NULL default value for malloced memory (optional, only if requested by configure option). This helps to track down some otherwise undetected issues within the testbench and is expected to be very useful in the future.
* | | | new queue engine - initial commit (probably not 100% working!)Rainer Gerhards2009-10-141-28/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplified and thus speeded up the queue engine, also fixed some potential race conditions (in very unusual shutdown conditions) along the way. The threading model has seriously changes, so there may be some regressions. NOTE: the code passed basic tests, but there is still more work and testing to be done. This commit should be treated with care.
* | | | added some debug settings plus improved shutdown sequenceRainer Gerhards2009-10-131-2/+2
| | | | | | | | | | | | | | | | ... non-working version!
* | | | bugfix and testbench improvementsRainer Gerhards2009-10-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - bugfix: solved potential (temporary) stall of messages when the queue was almost empty and few new data added (caused testbench to sometimes hang!) - fixed some race condition in testbench - added more elaborate diagnostics to parts of the testbench - solved a potential race inside the queue engine
* | | | bugfix: potential race condition in debug modeRainer Gerhards2009-07-201-1/+2
| | | |
* | | | bugfix: minor static memory leak while reading configurationRainer Gerhards2009-07-201-13/+12
| | | | | | | | | | | | | | | | | | | | This did NOT leak based on message volume. Also, did some cleanup during the commit.
* | | | enhanced worker thread pool by atomic opsRainer Gerhards2009-07-201-26/+15
| | | | | | | | | | | | | | | | | | | | ... greater performance and was able to remove a potential troublespot in a cancel cleanup handler.
* | | | architecture change: queue now always has at least one worker threadRainer Gerhards2009-07-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | ...if not running in direct mode. Previous versions could run without any active workers. This simplifies the code at a very small expense. See v5 compatibility note document for more in-depth discussion.
* | | | more cleanup/simplification (forgot to remove one mutex lock)Rainer Gerhards2009-07-201-24/+1
| | | |
* | | | some more threading changesRainer Gerhards2009-07-201-18/+6
| | | | | | | | | | | | | | | | ... as well as some cleanup
* | | | cleanup: removed no longer needed codeRainer Gerhards2009-07-201-18/+0
| | | |
* | | | removed mutex locksRainer Gerhards2009-07-171-30/+33
| | | | | | | | | | | | | | | | | | | | ... by utilizing that we need to modify a state variable only in a sequential way during shutdown.
* | | | further code simplificationRainer Gerhards2009-07-171-42/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... could even remove one mutex by using a better algorithm. I think I also spotted some situation in which a hang could have happened. As I can't fix it in v4 and less without moving to the new engine, I make no effort in testing this out. Hangs occur during shutdown, only (if at all). The code changes should also result in some mild performance improvement. Some bug potential, but overall the bug potential should have been greatly reduced.
* | | | more code simplification, should also bring some performance enhancementRainer Gerhards2009-07-171-18/+9
| | | | | | | | | | | | | | | | reducing the number of thread cancellation state changes
* | | | Merge branch 'beta'Rainer Gerhards2009-07-161-1/+5
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: runtime/wti.c runtime/wtp.c
| * | | Merge branch 'v4-beta' into v4-develRainer Gerhards2009-07-161-2/+5
| |\ \ \
| | * | | calls to prctl() need to be based on configure results (cross-platform issue)Rainer Gerhards2009-07-161-2/+5
| | | | |
* | | | | some code simplificationRainer Gerhards2009-07-161-2/+2
| | | | |
* | | | | further reduction in code size/complexity due to design changeRainer Gerhards2009-07-081-30/+3
| | | | |
* | | | | simplified worker thread handlingRainer Gerhards2009-07-081-66/+2
| | | | | | | | | | | | | | | | | | | | | | | | | based on now working with detached threads. This is probably the biggest patch in this series and with large bug potential.
* | | | | optimizing queue thread handlingRainer Gerhards2009-07-081-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... first commit in a series of more. Makes worker threads detached. Needs more testing (will be done soon) and if it works as expected, we can further reduce code.
* | | | | Merge branch 'v4-devel'Rainer Gerhards2009-07-081-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: runtime/debug.h runtime/stream.c
| * | | | some minor cleanupRainer Gerhards2009-07-061-1/+2
| | | | |
| * | | | first shot at asynchronous stream writer with timeout capabilityRainer Gerhards2009-07-061-1/+5
| |/ / / | | | | | | | | | | | | | | | | ... seems to work on quick testing, but needs a far more testing and improvement. Good milestone commit.
* | | | Merge branch 'master' into v5-develRainer Gerhards2009-06-251-0/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: runtime/queue.c
| * | | named queue worker threadsRainer Gerhards2009-06-251-0/+6
| | | | | | | | | | | | | | | | ... but I don't see the name anywhere...?
| * | | some memory accesses are now explicitely atomicRainer Gerhards2009-06-251-1/+2
| | | | | | | | | | | | | | | | | | | | ... as far as I think this mostly is to keep the thread debuggers happy
* | | | added a few atomic operationsRainer Gerhards2009-06-251-1/+2
| | | | | | | | | | | | | | | | | | | | mostly to get thread debugger errors clean (plus, of course, it makes things more deterministic)
* | | | Merge branch 'omfile' into tmpRainer Gerhards2009-06-221-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a complex manual merge, especially in action.c. So if there occur some problems, this would be a good point to start troubleshooting. I run a couple of tests before commiting and they all went well. Conflicts: action.c action.h runtime/queue.c runtime/queue.h runtime/wti.c runtime/wti.h
| * | | removed uniprocessor optimizationRainer Gerhards2009-06-191-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | ... as it was not even optimal on uniprocessors any longer ;) I keep the config directive in, maybe we can utilize it again at some later point in time (questionable).
| * | | fixed a small memory leak...Rainer Gerhards2009-06-101-2/+1
| |/ / | | | | | | | | | and another problem, both introduced today. Also did some general cleanup.
* | | some more fixes for queue engineRainer Gerhards2009-05-281-6/+0
| | | | | | | | | | | | The enhanced testbench now runs without failures, again
* | | preserving current changesRainer Gerhards2009-05-281-6/+0
| | | | | | | | | | | | | | | | | | ... in preparation for some larger changes - I need to apply some serious design changes, as the current system does not play well at all with ultra-reliable queues. Will do that in a totally new version.
* | | interim commit: working on failure casesRainer Gerhards2009-05-271-0/+15
| | | | | | | | | | | | slightly improved situation, would like to save it before carrying on
* | | solved design issue with queue terminationRainer Gerhards2009-05-261-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and also improved the test suite. There is a design issue in the v3 queue engine that manifested to some serious problems with the new processing mode. However, in v3 shutdown may take eternally if a queue runs in DA mode, is configured to preserve data AND the action fails and retries immediately. There is no cure available for v3, it would require doing much of the work we have done on the new engine. The window of exposure, as one might guess from the description, is very small. That is probably the reason why we have not seen it in practice.
* | | free last processed message in all casesRainer Gerhards2009-05-201-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | so far, the last processed message was only freed when the next one was processed. This has been changed now. More precisely, a better algorithm has been selected for the queue worker process, which also involves less overhead than the previous one. The fix for "free last processed message" as then more or less a side-effect (easy to do) of the new algorithm.