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

Clean up Initialization and Finalization for DrvX #121

Merged
merged 15 commits into from
Jun 25, 2024

Conversation

ywwu928
Copy link
Contributor

@ywwu928 ywwu928 commented Jun 18, 2024

Description

Important -- Read Before Creating a Pull Request

PR description

  1. 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.

  2. 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.

  3. Termination is now determined by the following condition:

    • all CPs have finished distributing work
    • no more remaining tasks on all cores
      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

  • The additions follow the code standards in the developer guide.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@ywwu928 ywwu928 requested a review from tewaro June 19, 2024 17:02
@ywwu928 ywwu928 merged commit 795635c into main Jun 25, 2024
20 checks passed
@ywwu928 ywwu928 deleted the ywwu/init_final_cleanup branch June 25, 2024 22:29
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