Skip to content
Snippets Groups Projects
  1. Apr 10, 2022
  2. Mar 30, 2022
  3. Mar 15, 2022
    • Florian Fischer's avatar
      LinuxVersion: fix compare of versions with not the same amount of parts · f5c1c97d
      Florian Fischer authored
      LinuxVersion::compare reported two versions as equal if it could
      find a new '.' in the first version but not in the second.
      But this is clearly wrong because it skips comparision of the valid last
      part.
      
      The comparision 5.16.12 >= 5.18 returned true because compare
      reported the version as equal after comparing the first parts and
      finding a second '.' in the first but not the second.
      
      Fix this behavior by marking the current position as the last but
      do not skip its comparision.
      
      Add tests for the desired behaviour.
      f5c1c97d
  4. Mar 05, 2022
  5. Feb 21, 2022
  6. Feb 15, 2022
  7. Feb 12, 2022
  8. Feb 07, 2022
  9. Jan 30, 2022
  10. Jan 22, 2022
    • Florian Fischer's avatar
      [ScheduleOnTest] block worker thread if IO is not available · 26fdbcca
      Florian Fischer authored
      The alpha fiber waits to ensure the worker threads are suspended before
      starting to schedule work on specific threads.
      emper::sleep uses an AlarmFuture and thus needs emper to be build with IO
      support. If IO is not available we now just block the whole worker thread.
      26fdbcca
  11. Jan 21, 2022
    • Florian Fischer's avatar
      [LinuxVersion] fix version comparison · 7eb1fff6
      Florian Fischer authored
      LinuxVersion used the assumption that both strings have the same
      amount of dot-separated components.
      But this is obviously not always the case.
      If we can't compare the two strings further they must been equal so far.
      7eb1fff6
    • Florian Fischer's avatar
      [Future] add getter for the return value · 88b015be
      Florian Fischer authored
      A getter not calling sem.wait is needed so we don't call sem.wait twice:
      once during Future::cancel() and Future::wait() to obtain the return
      value afterwards.
      88b015be
    • Florian Fischer's avatar
      [CancelFutureTest] add test case using all workers · d6dad951
      Florian Fischer authored
      Our only cancellation test case where it is possible that the cancellation
      must happen on a specific worker uses a single fiber.
      The introduced massCancelOnDifferentWorker() test case uses
      workerCount * 5 fibers and actively tries to provoke cancellation on
      other workers.
      d6dad951
    • Florian Fischer's avatar
      fix Future cancellation and enable test case · b9d204e6
      Florian Fischer authored
      Remember the IoContext where a Future was prepared and submit
      the CancelWrapper on the correct Worker using scheduleOn.
      b9d204e6
    • Florian Fischer's avatar
      introduce new Scheduler::scheduleOn(fiber, workerId) function · 24993175
      Florian Fischer authored
      This function is needed to deal with worker local ressources: io_uring
      requests for example.
      
      Each worker now always has a MPSC inbox queue which was already used
      in the laws scheduling strategy.
      Fibers can be scheduled to a specific worker using the new
      Scheduler::scheduleOn method.
      
      Since the inbox queues are now always present we can use a single
      FiberSource enum combining AbstractWorkStealingStrategy::FiberSource
      and LawsStrategy::FiberSource.
      
      The laws strategy now uses the inbox queues as its priority queues.
      With the only differenze that when scheduling to a inbox queue
      using the Scheduler::scheduleOn the Fiber lifes only in the inbox
      queue and not also simultaneously in a WSQ.
      
      Unrelated code changes made while touching the code anyway:
      * Introduce FiberSource::io which hints that a Fiber comes from the
        worker's own CQ.
      * Strongly type the fiber's source in NextFiberResult.
      * Make all scheduler functions return std::optional<NextFiberResult>
      * Cleanup the identation in nextFiberResultViaWorkStealing
      24993175
  12. Jan 16, 2022
  13. Jan 14, 2022
  14. Jan 11, 2022
  15. Dec 25, 2021
    • Florian Fischer's avatar
      make cancellation in all emper variants sound · 9c0f2143
      Florian Fischer authored
      * Document data races of a future's state.
      * Get and set a Future's state only through methods. This helps to
        add possibly needed atomic operations.
      * Use atomics to get/set cancel and prepare state in IO_SINGLE_URING vaiant
      * Add more IO debug messages
      * Use the BPS of Futures with callbacks similar to those of forgotten
        ones to signal their preparation. The preparation mark the
        last moment where the Future is used in EMPER and after that the memory
        can be dropped.
        ATTENTION: This means not that the used resources of the IO request
        can be dropped. The kernel may still use a supplied buffer for example.
      * Fix Future chain cancellation in SubmitActor
      9c0f2143
  16. Dec 24, 2021
    • Florian Fischer's avatar
      properly cancel future callbacks · 95722c1b
      Florian Fischer authored
      Currently canceling Futures would never happen because we
      issued the cancel request only with the pointer of the future.
      This works more by coincidence than by design because
      the PointerTags::Future tagged onto the submitted future pointer is 0.
      
      This does not work for callbacks because they are tagged with a
      PointerTags != 0 and they don't use their callback pointer rather
      than the future pointer.
      
      Fix this by exporting the tagging from IoContext::prepareFutureChain
      into IoContext::createFutureTag and use this when submitting a cancel
      sqe.
      
      Warn the user that they have to manually take care of the memory safety
      of the callback because we can not await the callback in Future::cancel.
      
      Add a test case to CancelFutureTest.
      95722c1b
  17. Dec 16, 2021
  18. Dec 06, 2021
  19. Dec 03, 2021
    • Florian Fischer's avatar
      reduce test load when logging · 905fb18b
      Florian Fischer authored
      I suspect some test which scale whith the number of CPUs to timeout
      mostly on jenkins2.
      This patch reduces the load when logging is active and increases the
      load when logging is off.
      Therefore our test build with debugoptimized will do less and hopefully
      only timeout when they actually hung and the release test will do
      more.
      905fb18b
  20. Nov 23, 2021
    • Florian Fischer's avatar
      add concurrent BPS test · 65a593bc
      Florian Fischer authored
      The test introduces multiple cycles of Semaphores and
      a Fiber for each semaphore blocking and signaling the next.
      Through work-stealing the fibers from a cycle should be spread
      across different workers and thus test concurrent use of
      BinaryPrivateSemaphores.
      
      Cycle of length 3: Sem A -> Sem B -> Sem C -> Sem A -> ...
      Algorithm:
      	if isFirstInCycle
      		signal next
      
      	wait
      
      	if not isFirstInCycle
      		signal next
      65a593bc
  21. Nov 10, 2021
    • Florian Schmaus's avatar
      Fixes for clang-tidy 13 · dfa64867
      Florian Schmaus authored
      While we do not have yet LLVM 13 in the gitlab-ci, I use it on my
      systems. So fix the new warnings found with clang-tidy 13.
      dfa64867
  22. Sep 24, 2021
    • Florian Fischer's avatar
      [ConcurrentNetworkEchoTest] scale work with the available CPUs and log_level · 6afbf1d3
      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.
      6afbf1d3
    • Florian Fischer's avatar
      [SimpleDiskAndNetworkTest] don't terminate the Runtime during the test · 5c1c60ca
      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.
      5c1c60ca
  23. Sep 21, 2021
  24. Sep 16, 2021
  25. Sep 14, 2021
    • Florian Fischer's avatar
      [lib/LinuxVersion] multiple fixes · c1387013
      Florian Fischer authored
      * remove fancy but broken static LinuxVersion object.
        This means each usage of a EMPER_LINUX_* macro results in a syscall.
        But I think this is worth it when the result is a sound program.
        Users of those macros should store the result of the comparison anyway.
      * fix that we skipped parsing the last part of a version string
      * add a test for LinuxVersion
      * IO_MUST_INVALIDATE_BROKEN_CHAIN can still be const
      c1387013
  26. Sep 13, 2021
    • Florian Fischer's avatar
      [io/tests] use our own ASSERT macro unaffected by NDEBUG · 9fdc6e1a
      Florian Fischer authored
      This allows use to remove the current hack that the test are always
      build without NDEBUG regardless of the meson buildtype.
      
      Which is fact fixes the failing io tests in release builds.
      Because Future.hpp and Future.cpp see the same version of NDEBUG.
      9fdc6e1a
  27. Aug 19, 2021
Loading