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

WIP: refactored event handling #290

Closed
wants to merge 25 commits into from
Closed

WIP: refactored event handling #290

wants to merge 25 commits into from

Conversation

carns
Copy link
Member

@carns carns commented Sep 4, 2024

work in progress for #288

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 72.34043% with 26 lines in your changes missing coverage. Please review.

Project coverage is 37.10%. Comparing base (8645635) to head (d7bb0b6).

Files with missing lines Patch % Lines
src/margo-prio-pool.c 68.29% 4 Missing and 9 partials ⚠️
src/margo-core.c 80.55% 3 Missing and 4 partials ⚠️
src/margo-abt-config.c 62.50% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #290       +/-   ##
===========================================
- Coverage   57.67%   37.10%   -20.57%     
===========================================
  Files          70       71        +1     
  Lines       10149    10484      +335     
  Branches     1335     1341        +6     
===========================================
- Hits         5853     3890     -1963     
- Misses       3462     5955     +2493     
+ Partials      834      639      -195     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- this is a performance optimization; it should greatly reduce calls to
  cond_signal without any change in functionality
src/margo-prio-pool.c Fixed Show fixed Hide fixed
- something isn't quite working right in some unit tests
*/
ABT_pool_config_get(config, MARGO_PRIO_POOL_CONFIG_KEY_EFD, NULL,
&p_pool->efd);
// fprintf(stderr, "DBG: prio_pool got efd %d\n", p_pool->efd);

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
carns added 15 commits September 6, 2024 14:17
- for now same as old loop, but with features stripped out
- temporarily disabled all tests that rely on timers
- also fewer fn calls to clear state
- disabled for now, need to make some other adjustments
- this was only necessary as a workaround to a previous bug; its a bad
  idea
- re-enable event progress path
- only use event method if abt pool and hg context both support it
- use eventfd to break progress loop on finalize
- use infinite timeout on epoll_wait
- revert prio_pool to use condition variable at all times for its own
  internal purposes
- add user-space tracking of eventfd state to avoid writing events when
  it is already activated
- clear eventfd only when it has produced epoll events
@carns
Copy link
Member Author

carns commented Sep 17, 2024

Closing PR but keeping branch for historical reference if we find a need to revisit it. Adding the ability for an Argobots pool to signal when it needs attention (so that it could be intergrated more naturally into an event loop) proved to cause too much overhead vs. our existing approach.

@carns carns closed this Sep 17, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant