-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Map host FDs into AddressSpaces eagerly.
mm.MemoryManager.MMap(), which is primarily responsible for implementing application mmap(2), creates a sentry VMA (virtual memory area) as requested, but does not always create PMAs (platform mapping area) or the platform mappings they represent (via platform.AddressSpace.MapFile()). For mappings of files (as opposed to anonymous mappings), MMap() never creates platform mappings because the cost of doing so is unknown; in particular, if the file is gofer-backed, then creating a platform mapping may require that the requested pages be read from the gofer into sentry page cache, which may be relatively slow. However, in cases where the file is directly backed by a host file descriptor, we can override MMap()'s conservative heuristic by setting memmap.MMapOpts.PlatformEffect to at least PlatformEffectPopulate. PiperOrigin-RevId: 679624321
- Loading branch information
1 parent
fa27ee0
commit d80f478
Showing
3 changed files
with
26 additions
and
1 deletion.
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
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