-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make checkpoint/resume transparent to applications. #700
Comments
Awesome, thanks for filing this issue. I like the split in the proposed solution, we can do this over a couple of PRs. We should have some discussions on exactly what state should be stored and how strict we should be with accepting the new state. Also what are the time constraints? Is it valid for me to walk the file system that the WASI program has interacted with and store data at that point? Or should it already be cached in memory at that point? The redundancy between the real FS and our representation of the FS is a bit tricky, especially in the context of other applications running on the system, modiyfing this global mutable state. I'm sure that future people at Wasmer (probably me) will have to deal with this. But I think we can safely delay worrying about this too much for at least a year |
726: Add serialization for WASI state r=MarkMcCaskey a=MarkMcCaskey part of #700 Due to the trait objects from #583 , we can't use `serde` derive for this or use serde traits directly, we have to do some custom serialization (edit: luckily there's a crate for this: `typetag`) Co-authored-by: Mark McCaskey <[email protected]> Co-authored-by: Mark McCaskey <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
Would this ability to checkpoint and resume execution be available to the code being executed? Either by some sort of intrinsic, or maybe the environment could provide a host function that returns a particular trap? The use case I have in mind is to use WASM as a sandboxed environment for running (sequential) code, and being able to multitask between 10s or 100s of threads of execution concurrently. Kinda like green threads. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Feel free to reopen the issue if it has been closed by mistake. |
Motivation
With #489 and #567 , checkpoint/resume, migration, and OSR-based tier switching are now implemented. To make the process of checkpoint/resume completely transparent to applications, the environment also needs to be saved, and system calls need to be properly resumed from EINTR.
Proposed solution
Considering the complexity of different environments (WASI, Emscripten, etc.) starting from WASI would be a good choice.
The text was updated successfully, but these errors were encountered: