Skip to content
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

Map host FDs into AddressSpaces eagerly. #10978

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 1, 2024

  1. 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
    nixprime authored and gvisor-bot committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    152e8b5 View commit details
    Browse the repository at this point in the history