Stream: git-wasmtime

Topic: wasmtime / PR #2454 Refactor module instantiation in the ...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 26 2020 at 03:39):

peterhuene opened PR #2454 from instance-pooling to main:

This commit refactors module instantiation in the runtime to allow for
different allocator implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the DefaultInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocator set on which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This commit also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 26 2020 at 03:59):

peterhuene edited PR #2454 from instance-pooling to main:

This commit refactors module instantiation in the runtime to allow for
different allocator implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the DefaultInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocator set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This commit also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 20:28):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 20:28):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 20:28):

fitzgen created PR Review Comment:

Would be nice to note something like "it is the wasmtime crate's responsibility to ensure that the allocator outlives this instance" or something of the sort.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 20:28):

fitzgen created PR Review Comment:

Why do we have both of these? I would have expected just instance_allocator (without the Option) which is initialized by default to Arc::new(DefaultInstanceAllocator).

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 20:28):

fitzgen created PR Review Comment:

It isn't clear to me that implementations will ever do this initialization step differently. Do you expect it to change with instance pooling? If not, then I think we don't need to make initialize part of the trait.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 20:28):

fitzgen created PR Review Comment:

And if we just had instance_allocator, then this code would simplify a bit as well.

But I feel like I'm missing some kind of context about why we have both (a comment above the field definitions in the Config struct would really help readers out here!)

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 20:28):

fitzgen created PR Review Comment:

The public version of the trait doesn't have any deallocation hooks? I don't see any mention of this in the RFC either. How is the instance pool supposed to recycle an instance's memory?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:27):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:27):

peterhuene created PR Review Comment:

I do expect there to be some differences with the allocator implementations with respect to table / linear memory initialization. userfaultfd support can lazily initialize the pages, so it might simply take a reference on the initializers for later use, for example.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:27):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:27):

peterhuene created PR Review Comment:

I'll add that comment for safety.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:30):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:30):

peterhuene created PR Review Comment:

So the instance allocator is really meant for allocating module instances and not for the various "instantiations" Wasmtime does internally for representing host tables, memories, globals, and functions.

The "default" allocator is used exclusively for these internal instantiations as well as for module instantiations when a user does not provide an alternative instance allocator.

I can improve the comments around this to make that distinction clearer, but I'm also open to an alternative implementation.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:32):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:32):

peterhuene created PR Review Comment:

Agreed. I can comment on why the config is storing both, but I'm definitely open to any suggestions you might have regarding a different approach for handling internal host object instantiations vs. module instantiations.

The end goal being that I don't want a pooling allocator to treat host objects as counting towards any limits placed on the total number of instances supported by the pool.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:37):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:37):

peterhuene created PR Review Comment:

The RFC doesn't change the lifetime semantics of module instances, so this trait doesn't need a deallocate method as it is assumed a store owns the returned instance. When the store gets dropped, all associated instances will be deallocated like they are today.

This differs from the runtime InstanceAllocator trait as there's no concept of store there and handles are what are being allocated and deallocated.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 21:40):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:22):

fitzgen created PR Review Comment:

I feel like I'm missing something or we are talking past each other, sorry: When a store is dropped, doesn't the instance pool need to know that each of the store's instance's memory ranges are available for reuse now?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:22):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:23):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:23):

peterhuene created PR Review Comment:

Actually, I'm going to remove this field, along with the initialize and dealloc methods on InstanceHandle in favor of just calling on the allocator directly rather than shimming through the handle this way.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:34):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:43):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:43):

peterhuene created PR Review Comment:

It will via InstanceHandle::dealloc which is currently calling the associated allocator to deallocate the instance. The pool then will know what associated memories and tables to put back on the free list.

I'm trying to remove the allocator field of InstanceHandle though since I don't like storing this unsafe back pointer to the allocator.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:43):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:43):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:52):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 22:52):

fitzgen created PR Review Comment:

Okay and that dealloc call fowards to wasmtime_runtime::InstanceAllocator::deallocate, but that doesn't have a corresponding method in the public wasmtime::InstanceAllocator trait. Do we expect the instance pool to use the internal wasmtime-runtime APIs instead of the public wasmtime APIs? Do we expect any implementations of InstanceAllocator other than the default and the instance pool? Do we expect to eventually add a deallocate method to wasmtime::InstanceAllocator as well?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 23:00):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 23:00):

peterhuene created PR Review Comment:

What I'd like to do is remove the InstanceAllocator and DefaultInstanceAllocator types from the wasmtime crate in favor of Config taking a Arc<dyn wasmtime_runtime::InstanceAllocator> directly. This would both simply things and help me remove this back pointer from wasmtime_runtime::Instance to the allocator that created the instance so that deallocation can be handled directly from the drop implementation of Store.

I would then like to open up the construction of wasmtime_runtime::Instance and wasmtime_runtime::InstanceHandle such that instance allocators could be implemented in crates other than wasmtime_runtime.

However, given our stance on wasmtime being the crate we offer semantic versioning and wasmtime_runtime being an implementation details crate, I don't know if this is feasible to do.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 23:02):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:31):

peterhuene updated PR #2454 from instance-pooling to main:

This commit refactors module instantiation in the runtime to allow for
different allocator implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the DefaultInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocator set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This commit also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:33):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:33):

peterhuene created PR Review Comment:

This field has now been removed.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:34):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:34):

peterhuene created PR Review Comment:

This field has now been removed.

Where instance handles are created for host objects, the default instance allocator is explicitly used with a comment.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:34):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:34):

peterhuene created PR Review Comment:

The config no longer stores both the configured instance allocator and the default allocator.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:35):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:35):

peterhuene created PR Review Comment:

I've went ahead with an enum-based solution to the problem as discussed on the RFC (which I'll be amending shortly).

As such, the InstanceAllocator trait has been removed from the wasmtime crate.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:37):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 01:46):

peterhuene updated PR #2454 from instance-pooling to main:

This commit refactors module instantiation in the runtime to allow for
different allocator implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the DefaultInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocator set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This commit also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 19:53):

peterhuene updated PR #2454 from instance-pooling to main:

This commit refactors module instantiation in the runtime to allow for
different allocator implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the DefaultInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocator set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This commit also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 20:27):

peterhuene updated PR #2454 from instance-pooling to main:

This commit refactors module instantiation in the runtime to allow for
different allocator implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the DefaultInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocator set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This commit also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 20:50):

peterhuene updated PR #2454 from instance-pooling to main:

This commit refactors module instantiation in the runtime to allow for
different allocator implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the DefaultInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocator set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This commit also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 20:51):

peterhuene edited PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 20:55):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 21:07):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:09):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:09):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:09):

alexcrichton created PR Review Comment:

FWIW Box::new(SomeZst) as Box<dyn Any> doesn't actually allocate anything, so if the purpose of this was to eschew allocations I think it's fine to leave this without the Option?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:14):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:14):

peterhuene created PR Review Comment:

It wasn't to elide an allocation, but to take the host state out of the instance allocation request when creating the instance handle and passing the remainder of the request to initialize_vmcontext.

I'm happy to undo this change and just splat what's needed from the request as discrete arguments to initialize_vmcontext.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:15):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:22):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:22):

alexcrichton created PR Review Comment:

Ah ok that seems fine to leave as-is in that case!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:22):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2020 at 21:04):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2020 at 21:05):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2020 at 21:05):

peterhuene created PR Review Comment:

Given the latest changes to module linking which I've now rebased on, this is back to being Box<dyn Any>.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2020 at 21:05):

peterhuene has marked PR #2454 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2020 at 21:07):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2020 at 21:07):

peterhuene created PR Review Comment:

Whoops, this comment accidentally got removed during the rebase. Adding it back now.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2020 at 21:09):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 06:46):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 07:03):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 21:01):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 09 2020 at 00:03):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 09 2020 at 18:20):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 09 2020 at 18:32):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2020 at 01:18):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2020 at 01:20):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2020 at 06:38):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2020 at 20:44):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2020 at 21:03):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2020 at 21:27):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 22 2021 at 20:48):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 22 2021 at 20:56):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 22 2021 at 21:03):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 29 2021 at 19:52):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 00:52):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 00:53):

peterhuene edited PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 00:57):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 01:21):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 01:30):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 02:44):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 21:07):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 21:08):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 21:10):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 21:15):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 21:29):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 21:40):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 21:09):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 21:37):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 21:56):

peterhuene updated PR #2454 from instance-pooling to main:

This PR refactors module instantiation in the runtime to allow for
different instance allocation strategy implementations.

It adds an InstanceAllocator trait with the current implementation put behind
the OnDemandInstanceAllocator struct.

The Wasmtime API has been updated to allow a Config to have an instance
allocation strategy set which will determine how instances get allocated.

This change is in preparation for an alternative pooling instance allocator
that can reserve all needed host process address space in advance.

This PR also makes changes to the wasmtime_environ crate to represent
compiled modules in a way that reduces copying at instantiation time.

See bytecodealliance/rfcs#5 about these proposed changes.

This PR depends on #2434.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 11 2021 at 05:48):

peterhuene closed without merge PR #2454.


Last updated: Dec 23 2024 at 12:05 UTC