-
Notifications
You must be signed in to change notification settings - Fork 19
Provide mechanism to discard data #695
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
base: master
Are you sure you want to change the base?
Conversation
bbd1448 to
1dd2d54
Compare
| item = (parsec_list_item_t*)item->list_next; /* conversion needed for volatile */ | ||
| if( 0 == gpu_copy->readers ) { | ||
| if (cpu_copy->flags & PARSEC_DATA_FLAG_DISCARDED) { | ||
| parsec_list_item_ring_chop((parsec_list_item_t*)gpu_copy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. The flag isn't changed and the device copy maintains a reference on the data_t so if we miss the update of the flags here we will evict into the host copy and then release everything.
dde7129 to
14934a5
Compare
Add a function `parsec_data_discard` that releases the data such that the host copy remains intact but does not prevent destruction of the data once all device copies have been released. This keeps the host copy available for device copies to inspect and avoids potential race conditions in the release process. During an eviction, copies of data with a discarded host copy are not transfered but put directly into the lru. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Otherwise we cannot destroy empty or discarded data. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Also OR the flag instead of assigning it. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Discarded data may never be pushed back so don't warn about it still being owned by the device. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Discarded data sit toward the end of the lru while the data to be evicted is at the front. We walk both forward and backward to collect the discarded data from the back, until we either meet the pivot or we found enough data to evict. If we discarded data we don't evict. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
397ca9b to
53b7721
Compare
therault
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed during the call, issues raised are addressed and this is performance / feature - critical for MRA, so we should merge.
|
will review that it doesn't break dplasma and merge |
be66039 to
4f6b4c8
Compare
|
I modified this PR so that |
We only try to find discarded data if we know that there is discarded data. If no one discarded data (e.g., DPLASMA) we don't go look for it. This is also needed to properly clean up discarded data before releasing the zone allocator. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
4f6b4c8 to
9c7b42b
Compare
| #endif | ||
| }; | ||
|
|
||
| static inline void release_discarded_data(parsec_device_gpu_module_t *gpu_device, parsec_gpu_data_copy_t* gpu_copy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compiler says this function is not used.
|
This may not be needed anymore if we get |
Add a function
parsec_data_discardthat releases the data such that the host copy remains intact but does not prevent destruction of the data once all device copies have been released. This keeps the host copy available for device copies to inspect and avoids potential race conditions in the release process. During an eviction, copies of data with a discarded host copy are not transfered but put directly into the lru.Replaces some duplicated code with a call to
parsec_device_release_gpu_copy.