Commits on Source (82)
-
Florian Fischer authored
-
Florian Fischer authored
Introduce AbstractIoSleepStrategy holding most of the code needed for a sleep strategy using an IO object fur suspension/notification. This changes are used in future patches to implement more IO-based sleep strategies.
-
Florian Fischer authored
-
Florian Fischer authored
Eventfds are pollable (no iow thread is blocked reading from the IO object) contrary to waitfds. And using pipes seams also rather excessive especially since we ensure that only a single notification is written before it is consumed. This makes the code of the IO-based sleep strategies easier and I would expect also faster.
-
Florian Fischer authored
-
Florian Fischer authored
-
Florian Fischer authored
-
Florian Fischer authored
With Linux 5.18 io_uring supports sending notifications between io_urings. This removes the need of writing to a specific eventfd to notify specific sleeping workers. This greatly reduces the complexity of the sued algorithm because we do not longer need to prepare two sleeps in an atomic way. The notify specific algorithm no can be similar to the one used by the semaphore implementation. The notifier sets the state of the specific worker to Notified and if its was previously sleeping it is responsible to send a wakeup message. When a worker is going to sleep it sets its state to Running if it was notified the state is reset and the sleep attempt skipped. Otherwise a global read is prepared if needed and the worker waits on its io_uring.
-
Florian Fischer authored
When the custom logic of the IO-based sleep strategies returns false we already have set the sleeper state to Sleeping and must reset it.
-
Florian Fischer authored
The WaitfdSleepStrategy did not gather the amount of posted notifications but the PipeSleepStrategy did. Move the stats accounting into AbstractIoSleepStrategy so all derived strategies track the amount of written notifications.
-
Florian Fischer authored
-
Florian Fischer authored
-
Florian Fischer authored
In my master's thesis, I described in listing 4.4 an io_uring-based suspension and notification algorithm, which is slightly different from what emper does. The described algorithm does not reset the sleep state if a worker skips sleeping because of a global sleeper count of less than 0 (line 21). Emper does always reset the sleep state to SleeperState::Running if the sleep method returned early (either the worker was specifically notified or the global sleep count indicated to skip the sleep attempt). Both variants are sound, but invariably resetting the sleeper count to running minimizes the windows of useless specific notifications. However, the assertion in onNewWorkNotification assumes the sleep state is always SleeperState::Notified if a specific notification is received through the worker's io_uring. Emper, resetting the sleep state, introduces a race between the notifier observing the state as sleeping, setting it to notified, and posting a notification to the potential sleeper's io_uring. But the sleeper skips the sleep attempt because the global sleeper count righteously resetting its state to running while invalidating the assertion. Therefore we remove the assertion because it is not invariant.
-
Florian Schmaus authored
add waitfd support, generalize IO sleep_strategy code and use MSG_RING See merge request !411
-
Florian Schmaus authored
-
Florian Schmaus authored
[gitlab-ci] Bump image to debian-testing-dev:1.28 See merge request !412
-
Florian Schmaus authored
-
Florian Schmaus authored
[gitlab-ci] Bump debian-testing-dev to 1.29 See merge request !413
-
Florian Schmaus authored
-
Florian Schmaus authored
[gitlab-ci] Bump to debian-testing-dev 1.30 and iwyu 0.19 See merge request !414
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
Add apps/MatMul.cpp See merge request !416
-
Florian Schmaus authored
This also refactors a bit when we take timestamps.
-
Florian Schmaus authored
-
Florian Schmaus authored
The binary fails if the fibril is synced implicitly over its destructor. It appears that after membar(doSync()), the base pointer is wrong, causing the subsequent "reverseStealCount = 0" in syncWaitFree() to write to unallocate memory. I am not sure yet why, but this works around the issue.
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
eval/BFP9000: record csv See merge request !417
-
Florian Schmaus authored
If maxRetries is set, then actually retry the popTop() operation.
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
eval/BFP9000: create latencies_sorted, always mention units, alloc in constructor See merge request !419
-
Florian Schmaus authored
-
Florian Schmaus authored
If we reach this code with fibrilResumeValue == 0, then something went wrong (as it did with gcc-14, but that is solved in a later commit).
-
Florian Schmaus authored
-
Florian Schmaus authored
The previously used 'membar' macro does not have 'rax' in its clobber list. As result, a compiler may not reload the contents of 'rax' after the setJmp() call and instead 'cache' eax's value. However, 'rax' is used to pass the jump's value once we perfrom a long jump. Therefore, it should be part of the clobber list of setJmp(). In fact, GCC 14 started to perform an optimization in this case, causing Fibril synchronization to fail, as the passed fibrilResumeValue became 0. Compare the following code of ContextManager::start() GCC 13: 3f40d: e8 2e e8 fd ff call 1dc40 <Continuation::setJmp()::{lambda(Continuation*)#1}::operator()(Continuation*) const@plt> 3f412: 89 44 24 04 mov %eax,0x4(%rsp) 3f416: 48 98 cltq 3f418: 48 89 44 24 08 mov %rax,0x8(%rsp) 3f41d: 90 nop GCC 14: 3f8ea: e8 81 e2 fd ff call 1db70 <Continuation::setJmp()::{lambda(Continuation*)#1}::operator()(Continuation*) const@plt> 3f8ef: 90 nop As we can see, GCC 14 does not (re-)load eax back to its stack position after the setJmp().
-
Florian Schmaus authored
Fix Continuation::setJmp() See merge request !420
-
Florian Schmaus authored
Add missing "goto loop" to CL Queues See merge request !418
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
Various fixes and improvements See merge request !421
-
Florian Schmaus authored
Add WaitFreeCountingSemaphore See merge request !415
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
Using the emper::log facility adds a timestamp and worker ID to the printed message.
-
Florian Schmaus authored
-
Sadly, gitlab-runner does no longer support the "exec" command, so we have to use gitlab-ci-local as alternative.
-
Florian Schmaus authored
Newer flowdalic/gentoo-dev images have ENTRYPIONT specified, this prevents arguments from being passed to the docker run entrypoint, which is tools/docker-prepare in case of docker.sh. To fix that, we invoke "docker run" with "--entrypoint tools/docker-preapre" in docker.sh.
-
Florian Schmaus authored
sudo may not be available in the image, and runuser is preferred for this use-case anyway.
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
-
Florian Schmaus authored
Add a, simple for now, test for EMPER's low-level Continuation API.
-
Florian Schmaus authored
Turns out, 410cd9d1 ("[Continuation] Fix setJmp() by adding 'rax' to clobber list") was not enough for GCC 14 (probably newer ones). This time, the compiler (GCC 14.2.0) also failed to re-load %rax after the setJmp() and also seemed to perform optimizations based on the assumption that setJmp() would *always* return 0. It appears asm("nop" ::: "rax", "rbx", "r12", "r13", "r14", "r15", "memory"); in Continuation::setJmp() is now, after we added the 'noipa' attribute, also no longer necessary. But we keep it for now.
-
Florian Schmaus authored
-
Florian Schmaus authored
Bump CI See merge request flowpack/manycore/emper!4
-
Florian Schmaus authored
-
Florian Schmaus authored
[tools] improve check-iwyu script See merge request flowpack/manycore/emper!6
-
Florian Schmaus authored
-
Florian Schmaus authored
Protect "#include <format>" with guard for gcc-12 compatibility See merge request flowpack/manycore/emper!7
Showing
- .clang-tidy 3 additions, 0 deletions.clang-tidy
- .gitlab-ci-local/.gitignore 2 additions, 0 deletions.gitlab-ci-local/.gitignore
- .gitlab-ci.yml 11 additions, 5 deletions.gitlab-ci.yml
- Makefile 32 additions, 1 deletionMakefile
- apps/Coordinator.cpp 1 addition, 0 deletionsapps/Coordinator.cpp
- apps/EchoClient.cpp 9 additions, 5 deletionsapps/EchoClient.cpp
- apps/EchoServer.cpp 3 additions, 0 deletionsapps/EchoServer.cpp
- apps/EchoServerCallback.cpp 2 additions, 0 deletionsapps/EchoServerCallback.cpp
- apps/FibChildStealing.cpp 1 addition, 1 deletionapps/FibChildStealing.cpp
- apps/MatMul.cpp 294 additions, 0 deletionsapps/MatMul.cpp
- apps/WorkerSleepExample.cpp 1 addition, 3 deletionsapps/WorkerSleepExample.cpp
- apps/fsearch/fsearch.cpp 3 additions, 1 deletionapps/fsearch/fsearch.cpp
- apps/meson.build 27 additions, 1 deletionapps/meson.build
- docker.sh 2 additions, 1 deletiondocker.sh
- emper/BinaryPrivateSemaphore.cpp 1 addition, 0 deletionsemper/BinaryPrivateSemaphore.cpp
- emper/Blockable.hpp 4 additions, 1 deletionemper/Blockable.hpp
- emper/Common.cpp 6 additions, 3 deletionsemper/Common.cpp
- emper/Common.hpp 5 additions, 1 deletionemper/Common.hpp
- emper/Context.cpp 5 additions, 3 deletionsemper/Context.cpp
- emper/Context.hpp 21 additions, 8 deletionsemper/Context.hpp
.gitlab-ci-local/.gitignore
0 → 100644
apps/MatMul.cpp
0 → 100644