Skip to content
Snippets Groups Projects
  1. Dec 10, 2021
    • Florian Fischer's avatar
    • Florian Fischer's avatar
      Introduce waitfree workstealing · 1c538024
      Florian Fischer authored
      Waitfree work stealing is configured with the meson option
      'waitfree_work_stealing'.
      
      The retry logic is intentionally left in the Queues and not lifted to
      the scheduler to reuse the load of an unsuccessful CAS.
      
      Consider the following pseudo code examples:
      
      steal() -> bool:                       steal() -> res
        load                                   load
      loop:                                    if empty return EMPTY
        if empty return EMPTY                  cas
        cas                                    return cas ? STOLEN : LOST_RACE
        if not WAITFREE and not cas:
          goto loop                          outer():
        return cas ? STOLEN : LOST_RACE      loop:
                                               res = steal()
      outer():                                 if not WAITFREE and res == LOST_RACE:
        steal()                                  goto loop
      
      In the right example the value loaded by a possible unsuccessful CAS
      can not be reused. And a loop of unsuccessful CAS' will result in
      double loads.
      
      The retries are configurable through a template variable maxRetries.
      * maxRetries < 0: indefinitely retries
      * maxRetries >= 0: maxRetries
      1c538024
  2. Dec 09, 2021
  3. Dec 08, 2021
  4. Dec 06, 2021
  5. Dec 05, 2021
    • Florian Fischer's avatar
      [io/Stats] do not record steal attempts · 100f8532
      Florian Fischer authored
      Recording every steal attempt is rather excessive and we are not doing
      it for normal work.
      Flamegraphs have show io-stealing takes considerable more time
      than normal work stealing because of the recording of steal attempts,
      especially if we are using atomics to aggregate them.
      100f8532
  6. Dec 03, 2021
  7. Dec 02, 2021
  8. Nov 29, 2021
  9. Nov 24, 2021
  10. Nov 23, 2021
    • Florian Fischer's avatar
      127f6296
    • 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
  11. Nov 15, 2021
    • Florian Schmaus's avatar
      Merge branch 'fix_pipe_sleep_notifyFromAnywhere' into 'master' · cc63bd70
      Florian Schmaus authored
      [PipeSleepStrategy] fix notifyFromAnywhere
      
      See merge request !277
      cc63bd70
    • Florian Fischer's avatar
      [PipeSleepStrategy] fix notifyFromAnywhere · d31442ad
      Florian Fischer authored
      Don't decrease the sleeper count in the CAS loop further than
      -count, which is the threshold we need to ensure that the notification
      will be observed.
      Decreasing it further than our threshold is not faulty it just results
      in unnecessary skipped sleeps.
      
      Don't call writeNotifications with a negative count.
      Which will be interpreted as an unsigned value and thus results
      in writing way to much hints to the pipe, jamming it.
      If the original value before a successfully CAS is already negative
      we called writeNotifications with this negative value.
      This is fixed by using max(toWakeup, 0).
      d31442ad
  12. Nov 11, 2021
  13. Nov 10, 2021
  14. Oct 29, 2021
  15. Oct 28, 2021
    • Florian Schmaus's avatar
      Merge branch 'ci-debian-testing-dev-bump' into 'master' · fbe0b98f
      Florian Schmaus authored
      Ci debian testing dev bump
      
      See merge request !273
      fbe0b98f
    • Florian Schmaus's avatar
    • Florian Fischer's avatar
      [EchoSever] implement random computations variants · 964278bc
      Florian Fischer authored
      Now three variants of computation are available:
      
      * fixed (echoserver <port> <computation>:
         This will always consume computation us before sending the echo
         back to the client.
      * random range (echoserver <port> <computation> <computation-max>:
         This will consume a random computation uniformly selected
         from the interval [computation, computation-max] us.
      * random min-max (echoserver <port> <computation> <computation-max> <max-probability>
         This will either consume computation or computation-max us.
         The max computation is randomly chosen with the specified probability.
      
      All random values are generated with a thread_local mt19937 generator
      and uniformly distributed with uniform_{int,real}_distribution.
      964278bc
Loading