Skip to content

Conversation

byrnedj
Copy link
Contributor

@byrnedj byrnedj commented Jun 11, 2025

  1. use busypoll and autotune as defaults
  2. add tpause instruction
  3. change to use compiler intrinsics for UMWAIT and TPAUSE
  4. update the documentation for using UMWAIT
  5. clean up wait_method paths
  6. update min size to 32K

1. use busypoll and autotune as defaults
2. add tpause instruction
3. change to use compiler intrinsics for UMWAIT and TPAUSE
4. update the documentation for using UMWAIT
5. clean up wait_method paths
@byrnedj byrnedj requested review from jsydir and Copilot June 11, 2025 20:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the DTO wait methods by updating default wait behaviors, adding support for the TPAUSE instruction, and updating intrinsics and documentation accordingly.

  • Change default wait method from yield to busypoll
  • Introduce TPAUSE wait method and update UMWAIT intrinsics usage
  • Update documentation in README and add build flag changes in the Makefile

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
dto.c Updates wait methods, uses compiler intrinsics, and adds TPAUSE support.
README.md Updates documentation for new wait methods including TPAUSE.
Makefile Adds the -mwaitpkg flag needed for the new intrinsics.
Comments suppressed due to low confidence (2)

dto.c:394

  • There's an inconsistency in the TPAUSE wake-up state between 'dsa_wait_tpause' (using C02_STATE) and the TPAUSE branch in '__dsa_wait' (using C01_STATE). Consider aligning these values or documenting the rationale for the difference.
_tpause( C01_STATE, _rdtsc() + TPAUSE_C01_DELAY_NS);

dto.c:1148

  • The condition for enabling the TPAUSE wait method relies on the 'umwait_support' flag. If TPAUSE has separate hardware or library support requirements, consider verifying TPAUSE support explicitly.
if (!strncmp(env_str, wait_names[WAIT_TPAUSE], strlen(wait_names[WAIT_TPAUSE]))) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is tpause supported if umwait is supported? Should there be a separate check for tpause support?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in reference to line 1149

@byrnedj byrnedj merged commit 50f536d into intel:main Jun 27, 2025
1 check passed
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.

2 participants