0
Fork 0
mirror of https://github.com/Droid-VM/crosvm.git synced 2026-11-17 06:58:03 +00:00
crosvm/base
HuJK d661920599 crosvm: raise the open files limit to the system's ceiling at startup
Every GPU blob a guest makes holds host descriptors: the dma-buf the
renderer object keeps, the virgl resource's, and the export the
rutabaga resource keeps. An iPadOS benchmark (GFXBench Aztec Ruins high,
offscreen) holding about 12,000 buffers at once took the process to its
65,536 descriptors; the next ResourceCreateBlob failed with EMFILE ("dup
failed: Too many open files" in drm2kgsl_renderer_get_blob), which the
guest's driver met as an allocation failure, and the app crashed.

run_config now raises RLIMIT_NOFILE to /proc/sys/fs/nr_open (at most
1 << 20) before anything opens a device, or, without CAP_SYS_RESOURCE,
the soft limit to the hard one (base::linux::raise_max_open_files_to_ceiling).
The minijails take the raised limit as well. The same run now peaks at
66,340 descriptors and completes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmgVbdYzu7uPjUcpLVQMTq
History 2026-11-03 17:57:29 +08:00
..
base_event_token_derive ANDROID: simplify crosvm_defaults 2025-02-10 18:41:03 -08:00
patches ANDROID: simplify crosvm_defaults 2025-02-10 18:41:03 -08:00
src crosvm: raise the open files limit to the system's ceiling at startup 2026-11-03 17:57:29 +08:00
tests base: unix: make Tube wrap UnixSeqpacket directly 2024-12-07 00:00:14 +00:00
.build_test_serial Refactoring: Move common/base into base 2022-03-17 00:01:27 +00:00
Android.bp Merge remote-tracking branch 'aosp/upstream-main' into merge 2025-02-25 18:10:03 +00:00
Cargo.toml Merge remote-tracking branch 'aosp/upstream-main' into merge 2025-02-25 18:10:03 +00:00