CMA allocations fail due to pinned MOVABLE pages
summary
Android reserves ~20% RAM as CMA and large O_DIRECT workloads (OTA reads) create a cascade of short-term pinned MIGRATE_MOVABLE pages that exhaust MIGRATE_CMA pools, causing big CMA allocations (camera 256 MiB example) to fail for seconds. Patching alloc paths to use gfpma improves utilization but introduces other problems and an RFC was rejected; current mitigations wait (100 ms × 5) and a debugfs allocator is built to reproduce and test fixes. Suggested fixes: pause allocators to let page migration finish, ban O_DIRECT from CMA, or add a non-fallback migrate type.
AI-written summary · about
