forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Disco] Reduce Process/ThreadSession message queue reads and writes (a…
…pache#16817) This PR reduces the number of reads and writes for the message queue of ProcessSession and ThreadSession in Disco by caching all the data to read/write. The message queue in ThreadSession prior to this PR grabs the mutex for multiple times for a batch of data to read/write. This PR enables to read/write data from/to a local buffer first, and then read/write from/to the critical region together. This reduces the number of grabbing mutex to once. The message queue in ProcessSession prior to this PR reads/writes the inter-process pipe for multiple times for a batch of data. This PR uses a local buffer to cache all the data first, and then issues a single read/write from/to the pipe, and effectively reduces the number of reads/writes to the pipe, which may causes extra system overhead.
- Loading branch information
1 parent
f83a329
commit ca99a98
Showing
2 changed files
with
74 additions
and
27 deletions.
There are no files selected for viewing
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 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