-
Notifications
You must be signed in to change notification settings - Fork 185
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
Improve readers by parallelizing I/O and compute operations #5401
Open
ypatia
wants to merge
47
commits into
dev
Choose a base branch
from
yt/sc-59605/dont_block_io
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
This removes the read from waiting on all I/O operations and instead moves the I/O task to be owned by the datablock itself. If the I/O threadpool task is valid, we block on data access. This lets I/O and compute be interleaved by only blocking on data when its ready to be processed and allows for better background data loading.
This allows for copying the task/future an enabled multiple threads to check the status of the task in a thread-safe manner.
…checking. While the ThreadPool::SharedTask is designed to be used by multiple threads, its designed for copying. The data structure itself is not thread safe. A recursive mutext is needed because some functions like load_chunk_data call back into filtered_data() and would deadlock. This could be handled by also release the locking in load_chunk_data(), but a recursive_mutex is used for better safety against deadlocks.
… forward declaration issues currently
This is needed because we need to access the data buffer from inside the unfiltering task to unfilter into. We can't block on unfiltering being done from inside the unfiltering task so we need different accessors which let us bypass the check on if the unfiltering task is completed.
This is needed because zip_coordinates is called from the unfilter task itself.
ypatia
force-pushed
the
yt/sc-59605/dont_block_io
branch
from
December 18, 2024 09:53
73a2245
to
88c0ecb
Compare
ypatia
force-pushed
the
yt/sc-59605/dont_block_io
branch
from
December 18, 2024 15:30
b1d8be7
to
d391375
Compare
ypatia
force-pushed
the
yt/sc-59605/dont_block_io
branch
from
December 19, 2024 13:11
ed9b334
to
446700a
Compare
ypatia
changed the title
WIP: Improve readers by parallelizing I/O and compute operations
Improve readers by parallelizing I/O and compute operations
Dec 20, 2024
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.
Today when a reader issues the I/O request to VFS, we block waiting for all I/O to finish before moving to unfiltering. We then block again waiting for unfiltering to be done for all tiles and then continue to processing the results.
This PR is removing the need to wait for all I/O to be done, and uses async tasks to signal when a tile is done reading so that it can proceed to unfiltering, and when a tile is done unfiltering so that it can proceed to result processing before copying to the user buffers.
TYPE: IMPROVEMENT
DESC: Improve readers by parallelizing I/O and compute operations