-
Notifications
You must be signed in to change notification settings - Fork 269
Make thread_getWriteablePointer and thread_getReadablePointer zero-copy #888
Copy link
Copy link
Closed
Labels
Component: MainComposing the core Shadow executableComposing the core Shadow executablePriority: HighPrioritized ahead of most other issuesPrioritized ahead of most other issuesStatus: AcceptedBug is reproducible or effort is allocatedBug is reproducible or effort is allocatedType: EnhancementNew functionality or improved designNew functionality or improved design
Description
The thread_get(Readable|Writeable)Pointer interfaces were designed so that the implementations could potentially be zero-copy, but right now they both copy data from the plugin into a Shadow-allocated buffer. Worse, this copy involves syscalls, and for the threadpreload involves context switches between Shadow and the plugin.
In most or all cases, we should be able to arrange for plugin memory that Shadow needs to access to be directly mmap'd in shadow, such that these interfaces should only need to do some arithmetic to translate a plugin-pointer to a shadow-pointer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: MainComposing the core Shadow executableComposing the core Shadow executablePriority: HighPrioritized ahead of most other issuesPrioritized ahead of most other issuesStatus: AcceptedBug is reproducible or effort is allocatedBug is reproducible or effort is allocatedType: EnhancementNew functionality or improved designNew functionality or improved design