-
Notifications
You must be signed in to change notification settings - Fork 2
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
Clean up Initialization and Finalization for DrvX #121
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Important -- Read Before Creating a Pull Request
PR description
The power on and off part is not of interest in simulation (according to Mattan), so use natural pointers instead of GlobalPtr for those accesses to speed up. This will be emulating that there are special hardware such that when a pod has no more task, it will go to sleep directly. When a task is put onto the pod, there will be hardware mechanism to wake it up. This is a reasonable assumption confirmed with Mattan.
Replace waitAll() at the end of a program with endExecution(). This is an empty function in DrvX which can get rid of a lot of unwanted overhead. I tried the same thing in PREP but it won't work.
Termination is now determined by the following condition:
In order to achieve this, there is one variable pod_remaining_tasks_ per pod to keep track. The reason it is per pod is because work stealing can only steal from the same pod. If there are no more remaining tasks on a pod, the cores should go to sleep and not try to steal task which creates read overhead. Incrementing the remaining tasks is moved to execute_on call and will increment the task of the worker core instead of the task creation core. decrementing the remaining task is moved to operator()() of task where the task is actually executed.
Checklist