Re: userfaultfd: two-step UFFDIO_API always gives -EINVAL
From: stsp
Date: Mon Nov 25 2024 - 14:16:35 EST
25.11.2024 20:44, Peter Xu пишет:
Apps who tracks snapshots needs the unmodified pages before being written.
Those cannot rely on kernel resolution because it needs more than "if the
page is written" - it also needs the page data before being written.
Say I am writing a frame grabber
(not exactly, but very close to).
I monitor the video buffer of another
process, and "snapshot" it with some
frequency. I only need to know what
pages were modified, to reduce the
bandwidth to an absolute minimum,
and if the process is not playing - then
to not grab anything until it resumes.
UFFD_FEATURE_PAGEFAULT_FLAG_WP
works quite well for me already, but
I envision a huge boost with
UFFD_FEATURE_WP_ASYNC.
What would you suggest for that usage
scenario?