Stream: git-wasmtime

Topic: wasmtime / PR #4040 Remove support for userfaultfd


view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2022 at 20:26):

alexcrichton opened PR #4040 from rm-uffd to main:

This commit removes support for the userfaultfd or "uffd" syscall on
Linux. This support was originally added for users migrating from Lucet
to Wasmtime, but the recent developments of kernel-supported
copy-on-write support for memory initialization wound up being more
appropriate for these use cases than usefaultfd. The main reason for
moving to copy-on-write initialization are:

Overall there are no remaining benefits that userfaultfd gives that
copy-on-write doesn't, and copy-on-write solves a major downsides of
userfaultfd, the scaling issue with a single faulting thread.
Additionally copy-on-write support seems much more robust in terms of
kernel implementation since it's only using standard memory-management
syscalls which are heavily exercised. Finally copy-on-write support
provides a new bonus where read-only memory in WebAssembly can be mapped
directly to the same kernel cache page, even amongst many wasm instances
of the same module, which was never possible with userfaultfd.

In light of all this it's expected that all users of userfaultfd should
migrate to the copy-on-write initialization of Wasmtime (which is
enabled by default).

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2022 at 17:32):

peterhuene submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2022 at 17:42):

alexcrichton merged PR #4040.


Last updated: Dec 23 2024 at 13:07 UTC