-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Split out fiber stacks from fibers. #2741
Merged
peterhuene
merged 4 commits into
bytecodealliance:main
from
peterhuene:refactor-fiber-stacks
Mar 22, 2021
Merged
Split out fiber stacks from fibers. #2741
peterhuene
merged 4 commits into
bytecodealliance:main
from
peterhuene:refactor-fiber-stacks
Mar 22, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peterhuene
force-pushed
the
refactor-fiber-stacks
branch
4 times, most recently
from
March 19, 2021 02:45
96324fb
to
4ed3160
Compare
This commit splits out a `FiberStack` from `Fiber`, allowing the instance allocator trait to return `FiberStack` rather than raw stack pointers. This keeps the stack creation mostly in `wasmtime_fiber`, but now the on-demand instance allocator can make use of it. The instance allocators no longer have to return a "not supported" error to indicate that the store should allocate its own fiber stack. This includes a bunch of cleanup in the instance allocator to scope stacks to the new "async" feature in the runtime. Closes bytecodealliance#2708.
peterhuene
force-pushed
the
refactor-fiber-stacks
branch
from
March 19, 2021 03:21
4ed3160
to
13dbba6
Compare
github-actions
bot
added
the
wasmtime:api
Related to the API of the `wasmtime` crate itself
label
Mar 19, 2021
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasmtime:api"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
peterhuene
force-pushed
the
refactor-fiber-stacks
branch
from
March 19, 2021 06:23
13dbba6
to
386a24e
Compare
peterhuene
force-pushed
the
refactor-fiber-stacks
branch
from
March 19, 2021 06:57
386a24e
to
8e34022
Compare
This commit fixes the Windows implementation of fibers in Wasmtime to reserve enough staack space for Rust to handle any stack overflow exceptions.
peterhuene
force-pushed
the
refactor-fiber-stacks
branch
from
March 19, 2021 21:48
595f788
to
f556bd1
Compare
* Add assert to `StackPool::deallocate` to ensure the fiber stack given to it comes from the pool. * Remove outdated comment about windows and stacks as the allocator now returns fiber stacks. * Remove conditional compilation around `stack_size` in the allocators as it was just clutter.
alexcrichton
approved these changes
Mar 22, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR splits out a
FiberStack
fromFiber
, allowing the instanceallocator trait to return
FiberStack
rather than raw stack pointers. Thiskeeps the stack creation mostly in
wasmtime_fiber
, but now the on-demandinstance allocator can make use of it.
The instance allocators no longer have to return a "not supported" error to
indicate that the store should allocate its own fiber stack.
This includes a bunch of cleanup in the instance allocator to scope stacks to
the new "async" feature in the runtime.
Closes #2708.