Messages in this thread | | | Date | Mon, 7 Mar 2022 11:12:44 +0100 | Subject | Re: [PATCH RFC 0/3] MAP_POPULATE for device memory | From | David Hildenbrand <> |
| |
On 06.03.22 06:32, Jarkko Sakkinen wrote: > For device memory (aka VM_IO | VM_PFNMAP) MAP_POPULATE does nothing. Allow > to use that for initializing the device memory by providing a new callback > f_ops->populate() for the purpose. > > SGX patches are provided to show the callback in context. > > An obvious alternative is a ioctl but it is less elegant and requires > two syscalls (mmap + ioctl) per memory range, instead of just one > (mmap).
What about extending MADV_POPULATE_READ | MADV_POPULATE_WRITE to support VM_IO | VM_PFNMAP (as well?) ?
-- Thanks,
David / dhildenb
| |