Skip to content
Snippets Groups Projects
  1. Oct 13, 2021
  2. Oct 11, 2021
    • Florian Fischer's avatar
      [IoContext] document and fix possible scenario resulting in lost wakeup · 1e647338
      Florian Fischer authored
      This is fixed by using a normal lock instead of the try lock in the OWNER
      case.
      1e647338
    • Florian Fischer's avatar
      [IoContext] implement lockless CQ reaping · d9d350d9
      Florian Fischer authored
      TODO: think about stats and possible ring buffer pointers overflow and ABA.
      d9d350d9
    • Florian Fischer's avatar
      implement IO stealing · 0abc29ad
      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.
      0abc29ad
    • Florian Fischer's avatar
      [CallerEnvironment] Add a new OWNER caller environment · 69e73b98
      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.
      69e73b98
    • Florian Schmaus's avatar
      Merge branch 'write-stats-to-file' into 'master' · e677b305
      Florian Schmaus authored
      print runtime stats to the environment variable EMPER_STATS_FILE
      
      See merge request !269
      e677b305
    • Florian Fischer's avatar
      print runtime stats to the environment variable EMPER_STATS_FILE · a757eb0e
      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
      a757eb0e
    • Florian Schmaus's avatar
      Merge branch 'remove-useless-private-stats-members' into 'master' · 8160f360
      Florian Schmaus authored
      [sleep_strategy/Stats] remove old obsolete stats member
      
      See merge request !270
      8160f360
    • Florian Schmaus's avatar
      Merge branch 'fix-cache-line-exclusive-macro' into 'master' · 8c6aceca
      Florian Schmaus authored
      [Common.hpp] fix CACHE_LINE_EXCLUSIVE macro
      
      See merge request !268
      8c6aceca
    • Florian Schmaus's avatar
      Merge branch 'use-scheduler-hint-stats' into 'master' · 1b7295a9
      Florian Schmaus authored
      [AbstractWorkStealingStats] actually use hint stats
      
      See merge request !267
      1b7295a9
    • Florian Schmaus's avatar
      Merge branch 'fix-throttle-wakeup' into 'master' · 267e9876
      Florian Schmaus authored
      [WakeupStrategy] fix the throttle algorithm for notifiaction from anywhere
      
      Closes #26
      
      See merge request !266
      267e9876
  3. Oct 08, 2021
  4. Oct 04, 2021
    • Florian Fischer's avatar
      [WakeupStrategy] fix the throttle algorithm for notifiaction from anywhere · baedc874
      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.
      baedc874
  5. Sep 27, 2021
  6. Sep 25, 2021
  7. Sep 24, 2021
  8. Sep 23, 2021
  9. Sep 22, 2021
  10. Sep 21, 2021
Loading