- Oct 13, 2021
-
-
Florian Fischer authored
The lockless algorithm can now be configured by setting -Dio_lockless_cq=true and the used memory ordering by setting -Dio_lockless_memory_order={weak,strong}. io_lockless_memory_order=weak: read with acquire write with release io_lockless_memory_order=strong: read with seq_cst write with seq_cst
-
Florian Fischer authored
In a running gdb process use: source tools/gdb/dump_runtime_state.py to dump the state of all threads, all WSL queues and all worker IoContexts.
-
- Oct 11, 2021
-
-
Florian Fischer authored
This is fixed by using a normal lock instead of the try lock in the OWNER case.
-
Florian Fischer authored
TODO: think about stats and possible ring buffer pointers overflow and ABA.
-
Florian Fischer authored
IO stealing is analog to work-stealing and means that worker thread without work will try to steal IO completions (CQEs) from other worker's IoContexts. The work stealing algorithm is modified to check a victims CQ after findig their work queue empty. This approach in combination with future additions (global notifications on IO completions, and lock free CQE consumption) are a realistic candidate to replace the completer thread without loosing its benefits. To allow IO stealing the CQ must be synchronized which is already the case with the IoContext::cq_lock. Currently stealing workers always try to pop a single CQE (this could be configurable). Steal attempts are recorded in the IoContext's Stats object and successfully stolen IO continuations in the AbstractWorkStealingWorkerStats. I moved the code transforming CQEs into continuation Fibers from reapCompletions into a seperate function to make the rather complicated function more readable and thus easier to understand. Remove the default CallerEnvironment template arguments to make the code more explicit and prevent easy errors (not propagating the caller environment or forgetting the function takes a caller environment). io::Stats now need to use atomics because multiple thread may increment them in parallel from EMPER and the OWNER. And since using std::atomic<T*> in std::map is not easily possible we use the compiler __atomic_* builtins. Add, adjust and fix some comments.
-
Florian Fischer authored
The OWNER caller environment can be used when the executed algorithm should be different if the current worker owns the objects it touches. For example a worker reaping completions on a foreign IoContext may use the EMPER callerEnvironment and the worker of the IoContext OWNER. Also implement the stream operator to print caller environments.
-
Florian Schmaus authored
print runtime stats to the environment variable EMPER_STATS_FILE See merge request !269
-
Florian Fischer authored
* Make all stats print methods accept a std::ostream as output. * Move the printing of runtime component stats into Runtime::printStats. * Use Runtime::printStats instead of Runtime::printLastRuntimeStats in ~Runtime, because we are already in a runtime which may differ from Runtime::currentRuntime. * Write the stats in ~Runtime to a possible file passed in the environment variable EMPER_STATS_FILE
-
Florian Schmaus authored
[sleep_strategy/Stats] remove old obsolete stats member See merge request !270
-
Florian Schmaus authored
[Common.hpp] fix CACHE_LINE_EXCLUSIVE macro See merge request !268
-
Florian Schmaus authored
[AbstractWorkStealingStats] actually use hint stats See merge request !267
-
Florian Schmaus authored
[WakeupStrategy] fix the throttle algorithm for notifiaction from anywhere Closes #26 See merge request !266
-
- Oct 08, 2021
-
-
Florian Fischer authored
Before 713c0f04 emper::sleep_strategy::Stats had the actual stats member but with 713c0f04 WorkerStats are introduced which have the actual stats member but I apparently forgot to remove the old now obsolete members. Thanks clang for detecting this!
-
Florian Fischer authored
-
Florian Fischer authored
The macro did not replace symbol in __symbol_mem and always created the literal symbol __symbol_mem which makes the macro unusable in the same scope twice.
-
- Oct 04, 2021
-
-
Florian Fischer authored
The throttle algorithm had the same problem like our sleep algorithms where notifications from anywhere may race with a worker going to sleep resulting in lost wakeups. In the sleep strategy we prevent those races by preventing sleep attempts when notifing from anywhere. The throttle algorithm also does now exactly this. A notifier from anywhere will now always set the WakeupStrategy state to notified. If the state was previously pending this new approach does not differ from the previous behavior and a sleeping worker will be notified. If the state was waking the waking worker skips its sleep if it observes the WakeupStrategy state as notified.
-
- Sep 27, 2021
-
-
Florian Fischer authored
[log] improve timestamp scalability and increase LogBuffer size See merge request !265
-
Florian Fischer authored
std::localtime takes a global lock and is therefore not scalable and inapplicable for analyzing timing sensible bugs. Introduce a new option to add UTC timestamps. This allows on my system to double the CPU load while using mmapped logging. Also increase the LogBuffer size from 1MB to 1GB because I had some crashes where a renewed buffer was still used.
-
- Sep 25, 2021
-
-
Florian Fischer authored
[EchoServer] set SO_REUSEPORT on the listen socket See merge request !264
-
- Sep 24, 2021
-
-
Florian Fischer authored
This is needed by emper-io-eval because apparently our startup/termination times are shorter than the OS allows the rebinding of the same tcp tuple. Also make all global variables static because they don't have to be exported.
-
Florian Schmaus authored
[ConcurrentNetworkEchoTest] scale work with the available CPUs and log_level See merge request !262
-
Florian Fischer authored
[SimpleDiskAndNetworkTest] don't terminate the Runtime during the test Closes #25 See merge request !261
-
Florian Fischer authored
The chosen amounts of echos take on my 16 core ryzen system ~5seconds. This should hopefully reduce CI timeout where we are not sure if they are bugs or legit timeouts. Furthermore this should reduce the amount of logs we write and have to store after each CI run.
-
Florian Fischer authored
Before 05dc56ed the two test cases testDiskAndNetwork, testIov where combined in one function which was terminating the runtime after the client closed its socketafter the test was done. This was already broken before 05dc56ed but after the separation of the two use cases the race between the Runtime terminating and the execution of the last parts of the test-runner's alphaFiber became bigger. When the Runtime terminates because the last worker running the testIoV code has outstanding IO the test-runner's successSem is never notified.
-
Florian Schmaus authored
disable throttle test in CI and add more debug messages. See merge request !263
-
Florian Schmaus authored
[IoContext] replace fancy CQ locking with a mutex and CQ emptiness check See merge request !258
-
Florian Fischer authored
-
Florian Fischer authored
Also pass getWakeupCount the CallerEnvironment because this is the place were we must change something to prevent lost wakeups when notifying from anywhere.
-
- Sep 23, 2021
-
-
Florian Schmaus authored
[WakeupStrategy] introduce a new class to model our wakeup strategies See merge request !254
-
- Sep 22, 2021
-
-
Florian Fischer authored
-
Florian Fischer authored
The macro uses std::aligned_storage to ensure the symbol is properly cache line aligned and cache line sized. This prevents cache line sharing with another symbol. The actual symbol is initialized with the placement new operator and for now must have a constructor without arguments.
-
- Sep 21, 2021
-
-
Florian Schmaus authored
[CI] enable IO in the now buster based CI See merge request !256
-
Florian Schmaus authored
[tools/prepare-build-dir] fail if unknown meson option is set See merge request !257
-
Florian Fischer authored
-
Florian Fischer authored
-
Florian Fischer authored
* single io_uring * pipe sleep strategy * pipe sleep strategy without completer
-
Florian Fischer authored
-
Florian Fischer authored
* Use more emper io functions * Split the separate test cases into two functions * Use C++ arrays where sensible
-
Florian Fischer authored
-
Florian Fischer authored
-