Messages in this thread | | | From | Thomas Martitz <> | Subject | Re: [PATCH 10/21] userfaultfd: add new syscall to provide memory externalization | Date | Mon, 16 Mar 2015 10:45:37 +0000 (UTC) |
| |
Andrea Arcangeli <aarcange <at> redhat.com> writes:
> > Once an userfaultfd has been created and certain region of the process > virtual address space have been registered into it, the thread > responsible for doing the memory externalization can manage the page > faults in userland by talking to the kernel using the userfaultfd > protocol. > > poll() can be used to know when there are new pending userfaults to be > read (POLLIN). >
Hello,
I'm wondering why a new syscall was chosen over a simple special file /dev/userfault (analogous to /dev/shm) to obtain an fd. In my book the special file has only advantanges: no additional syscall is needed, system admins can tweak access to this feature via normal file permissions, and signaling the availability of the feature in the kernel simply by the existence of the dev file.
I already wondered the same for memfd(). Here I can perhaps follow that there is a need such fds before /dev is mounted (because PID1 might need it). But not for this case as devtmpfs should be mounted early enough.
Not saying it's the wrong decision, but I want to learn about the rationale.
Best regards.
| |