Re: Migration/remap question for hugee pages of 2MB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21.01.25 09:18, Mounesh Badiger wrote:
Hi,
Hi,

Can linux-mm group confirm, if huge pages of size 2MB cannot be migrated or remapped when user-space uses them for IO with the bypassing kernel? We need to VA->PA intact once it is mapped.
We want to reserve huge pages and map them using hugetlbfs into the 
userspace.  Use /proc/<pid>/pagemap  to get VA->PA mapping and use PA 
for IO.
A kernel that supports CONFIG_MIGRATION will be able to migrate 2 MiB 
hugetlb folios on most architectures (e.g., x86-64). Such migration 
might be triggered by CMA allocations or memory offlining.
IIRC, ordinary page compaction should not be migrating 2 MB hugetlb 
folios, because they consume a full pageblock and there is, therefore, 
no value in trying to compact such pageblocks.
So short answer: they can get migrated, but migration might not happen 
frequently.
To block migration, you could long-term pin these pages from getting 
migrated either using vmsplice() or iouring fixed buffers. (the latter 
is preferred).
--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux