gfxreconstruct
gfxreconstruct copied to clipboard
userfaultfd async wp mode in page guard manager
Congratulations on shipping userfaultfd support in the page guard manager!
It looks like overhead was noted as a concern when using the userfaultfd option. I would like to point out that a recently added "Async Write-Protect" mode for userfaultfd is intended to address change-tracking use cases like this.
The feature is documented at https://docs.kernel.org/admin-guide/mm/userfaultfd.html#write-protect-notifications, and is used in Valve's Wine fork (https://github.com/ValveSoftware/wine/blob/bleeding-edge/dlls/ntdll/unix/virtual.c) to emulate Win32's write watches. What gfxr is doing should be similar to write watches, so perhaps the Wine source can be used as a reference when implementing async wp support.