You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mm: get huge pages for unaligned allocations spanning at least one huge page
When page faults trigger pgalloc.MemoryFile allocation, the size of the
allocation never exceeds one huge page, and if it is exactly one huge page in
size then it will be hugepage-aligned. However, when pgalloc.MemoryFile
allocation is triggered by memory-mapped I/O (e.g. a read() to unfaulted
memory), mmap(MAP_POPULATE), mlock(), or MM.Pin() (due to driver activity), the
allocated range may be hugepage-unaligned but include one or more aligned huge
pages; in these cases, split the allocation into up to three parts for the
sub-hugepage subrange at the beginning, the sub-hugepage subrange at the end,
and the hugepage-aligned subrange in between, so that the hugepage-aligned
subrange can use a hugepage-backed allocation.
PiperOrigin-RevId: 812961653
0 commit comments