Skip to content

Remove inter-round collect info step in scheduler#1258

Merged
robgjansen merged 1 commit intoshadow:mainfrom
robgjansen:next-event-time
Apr 4, 2021
Merged

Remove inter-round collect info step in scheduler#1258
robgjansen merged 1 commit intoshadow:mainfrom
robgjansen:next-event-time

Conversation

@robgjansen
Copy link
Copy Markdown
Member

We stop waking threads up in between rounds in order to compute
the minimum next event time. Instead we keep track of the min time
during the execution of the round.

Closes #1249

@robgjansen robgjansen added Type: Maintenance Refactoring, cleanup, documenation, or process improvements Component: Main Composing the core Shadow executable labels Apr 3, 2021
@robgjansen robgjansen self-assigned this Apr 3, 2021
@robgjansen robgjansen marked this pull request as ready for review April 4, 2021 01:04
@robgjansen robgjansen requested a review from sporksmith April 4, 2021 01:04
@robgjansen
Copy link
Copy Markdown
Member Author

@sporksmith Sorry, I couldn't resist removing the linear scan over the LPs between rounds :) I'm done now.

What do you think about moving the roundEndTimes and minEventTimes arrays into the LogicalProcessor module, since we are storing one per logical processor anyway? I looked and it seemed a bit out of place there, but it might make sense to move it there for organization?

Copy link
Copy Markdown
Contributor

@sporksmith sporksmith left a comment

Choose a reason for hiding this comment

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

What do you think about moving the roundEndTimes and minEventTimes arrays into the LogicalProcessor module, since we are storing one per logical processor anyway? I looked and it seemed a bit out of place there, but it might make sense to move it there for organization?

I mildly prefer as you have it now. Right now LogicalProcessor is mostly decoupled from the workers and scheduler. I considered even having it manipulate void* instead of Worker* but decided it wasn't worth the extra casting since we'll only use Worker* in practice :). (Maybe if we had C++ templates or Rust generics)

We stop waking threads up in between rounds in order to compute
the minimum next event time. Instead we keep track of the min time
during the execution of the round.

When using the work-stealing scheduler, we manage spinning on the
isStealable initialization flag without doing a linear scan over
the threads in between rounds to reset the flag.

closes #1249
@robgjansen robgjansen merged commit 1c7c8da into shadow:main Apr 4, 2021
@robgjansen robgjansen deleted the next-event-time branch April 4, 2021 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Main Composing the core Shadow executable Type: Maintenance Refactoring, cleanup, documenation, or process improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Determine next round time dynamically during round

2 participants