Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • E emper
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • i4i4
  • manycore
  • emper
  • Merge requests
  • !289

Introduce waitfree work/io-stealing

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Florian Fischer requested to merge aj46ezos/emper:stealing-changes into master Dec 09, 2021
  • Overview 0
  • Commits 4
  • Pipelines 3
  • Changes 9

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
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: stealing-changes