Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a progressive backoff mechanism for barriers. #607

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devinamatthews
Copy link
Member

The mechanism(s) used for backoff must be defined by the configuration or configuration family. Up to three successive mechanisms are supported (e.g. pause/sched_yield/sleep).

Example (in config/<family>/bli_family_<family>.h):

#define BLIS_BARRIER_BACKOFF_1 30    // number of times to loop
#define BLIS_BARRIER_YIELD_1 pause();pause();pause();

//#define BLIS_BARRIER_BACKOFF_2    not needed, the last mechanism is looped forever 
#define BLIS_BARRIER_YIELD_2 sched_yield();

This PR supplants #82 and potentially addresses #604 (family-specific behavior still needs to be decided upon and implemented).

Families needing implementations:

  • Intel
  • AMD (same as Intel?)
  • ARM (v7 same as v8?)
  • POWER

The mechanism(s) used for backoff must be defined by the configuration or configuration family. Up to three successive mechanisms are supported (e.g. pause/sched_yield/sleep).
@jeffhammond
Copy link
Member

Jim Cownie wrote about this topic here: https://cpufun.substack.com/p/to-sched_yield-or-not-to-sched_yield.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants