- Mar 08, 2021
-
-
Florian Fischer authored
Nagle's algorithm which tries to prevent small TCP frames is harmful for our throughput if we send small echos. Arithmetic means are inaccurate if the sample has extreme outliers therefore we record and report the total execution times.
-
Florian Schmaus authored
[IO] parallelize IO startup See merge request i4/manycore/emper!122
-
Florian Schmaus authored
[meson] remove obsolete io_batch_anywhere_completions option See merge request i4/manycore/emper!121
-
Florian Fischer authored
GlobalIoContext::registerWorkerIo() now protects the GlobalIoContext's SQ with a mutex and the globalCompleter waits till all worker's registered their IoContext with the new Sempahore Runtime.ioReadySem.
-
Florian Fischer authored
Since 8f38dbed the globalCompleter does always reap and schedule in batches through IoContest::reapAndSchedule<CallerEnvironment::ANYWHERE> -> Runtime::scheduleFromAnywhere(Input it begin, InputIt end) -> AnywhereQueue::insert(Input it begin, InputIt end)
-
- Mar 03, 2021
-
-
Florian Schmaus authored
EMPER shutdown See merge request i4/manycore/emper!111
-
Florian Schmaus authored
-
- Mar 02, 2021
-
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
Fix reap completion race See merge request i4/manycore/emper!117
-
- Mar 01, 2021
-
-
Florian Fischer authored
-
Florian Fischer authored
Our current naive try lock protecting a worker's IoContext's cq is racy. This fact alone is no problem a try lock is by design racy in the sense that two threads race who can take the lock. The actual problem is: While a worker is holding the lock additional completions could arrive which the worker does not observe because it could be already finished iterating the CQ. In the case that the worker still holds the lock preventing the globalCompleter from reaping the additional completions there exists a lost wakeup problem possibly leading to a completely sleeping runtime with runnable completions in a worker's IoContext. To prevent this lost wakeup the cq_lock now counts the unsuccessful lock attempts from the globalCompleter. If a worker observes that the globalCompleter tried to reapCompletions more than once we know that a lost wakeup could have occurred and we try to reap again. Observing one attempt is normal since we know the globalCompleter and the worker owning the IoContext race for the cq_lock required to reap completions. Additionally: * Reduce the critical section in which the cq_lock is held by copying all seen cqes and completing the Futures after the lock was released. * Don't immediately schedule blocked Fibers or Callbacks rather collect them an return them as batch. Maybe the caller knows better what to to with a batch of runnable Fibers
-
Florian Schmaus authored
[meson] remove duplicate overflow_queue meson option See merge request i4/manycore/emper!118
-
Florian Fischer authored
-
Florian Schmaus authored
Prepare the IO subsystem for emper's future See merge request i4/manycore/emper!114
-
Florian Fischer authored
All code related to the gloablIo is moved from IoContext to the GlobalIoContext child class. Remember the runtime in each IoContext which created the IoContext. This allows the IoContexts to be independent from a global runtime reference. Because of this change a IoContext (global or worker) musst be retrieved from the a runtime object using Runtime::getIo() The only point in the IO subsystem where we depend on Runtime::getRuntime() is when resubmitting a PartialCompletableFuture. To be sure we use the correct Runtime object Runtime::getRuntime() should return the runtime which started the thread (worker or globalCompleter). This could be achieved by remembering the runtime in a thread_local variable for example. The global completer thread is now tied to a GlobalIoContext object and can be terminated using the GlobalIoContext's eventfd through GlobalIoContext::initiateTermination() and GlobalIoContext::waitUntilFinished()
-
Florian Schmaus authored
Improve boost dependency and bump gitlab-ci docker image See merge request !116
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
[build] Re-enable non-virtual-dtor warning See merge request !115
-
Florian Schmaus authored
This should improve the CI response time, as we now (potentially) perform iwyu and clang-tidy in parallel.
-
Florian Schmaus authored
-
Florian Schmaus authored
-
- Feb 26, 2021
-
-
Florian Schmaus authored
Make LockedUnboundedQueue implementation configurable See merge request i4/manycore/emper!113
-
Florian Fischer authored
Available implementations configurations through the meson option 'locked_unbounded_queue_implementation' are: mutex - our current LockedUnboundedQueue implementation using std::mutex rwlock - An implementation with pthread_rwlock. The implementations tries to upgrade its rdlock and drops and acquires a wrlock on failure shared_mutex - An implementation using std::shared_mutex. dequeue() acquires a shared lock at first, drops it and acquires a unique lock boost_shared_mutex - An implementation using boost::shared_mutex. dequeue() acquires an upgradable lock and upgrade it to a unique lock if necessary
-
Florian Fischer authored
The emper header LockedUnboundedQueue.hpp could depend on different libraries according to the implementation. To link those dependencies with everything including LockedUnboundedQueue.hpp we propagate all emper_dependencies through emper_dep. And using emper_dep as a dependency seems anyway better than essentially writing down emper_dep manually each time. emper_dep essentially is: (link_with:emper, include_directories: emper_all_include)
-
Florian Schmaus authored
add a batch optimization for the global completer See merge request !110
-
Florian Schmaus authored
Minor improvements See merge request !112
-
Florian Fischer authored
This change introduces new scheduleFromAnywhere methods which take a range of Fibers to schedule. Blockable gets a new method returning the fiber used to start the unblocked context, which is used by Future/PartialCompletableFuture to provide a way of completion and returning the continuation Fiber to the caller so they may schedule the continuation how they want. If the meson option io_batch_anywhere_completions is set the global completer will collect all callback and continuation fibers before scheduling them at once when it is done reaping the completions. The idea is that taking the AnywhereQueue write lock and calling onNewWork must only be done once. TODO: investigate if onNewWork should be extended by an amountOfWork argument which determines how many worker can be awoken and have work to do. This should be trivially since our WorkerWakeupSemaphore implementations already support notify_many(), which may be implemented in terms of notify_all though.
-
Florian Schmaus authored
-
Florian Schmaus authored
-
- Feb 25, 2021
-
-
Florian Schmaus authored
[Runtime] add env options to define workerCount and pinningOffset See merge request !109
-
Florian Fischer authored
Introduced environment variables: * EMPER_WORKER_COUNT: specifies how many worker the Runtime default constructor starts. * EMPER_PINNING_OFFSET: specifies the cpu id where the workers should be pinned round robin. Both variables allow multiple emper processes to run on the same system by splitting the available cores. EMPER_WORKER_COUNT=1 build/apps/echoserver && EMPER_WORKER_COUNT=1 EMPER_PINNING_OFFSET=1 build/apps/echoclient Starts a single threaded echoserver on core 0 and a single threaded echo client on core 1.
-
Florian Schmaus authored
Minor fixes See merge request !108
-
Florian Schmaus authored
-
Florian Schmaus authored
-
- Feb 24, 2021
-
-
Florian Schmaus authored
add three semaphore implementations and make wakeupSem configurable See merge request !107
-
- Feb 23, 2021
-
-
Florian Fischer authored
LockedSemaphore is the already existening Semaphore using a mutex and a condition variable. PosixMutex is a thin wrapper around a POSIX semaphore. SpuriousFutexSemaphore is a atomic/futex based implementation prune to spurious wakeups which is fine for the worker wakeup usecase.
-
Florian Schmaus authored
[Runtime] Fix skipWakeupThreshold value See merge request !106
-