Skip to content
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

Wasix major fixes and tweaks #3584

Merged
merged 13 commits into from
Feb 16, 2023
Merged

Wasix major fixes and tweaks #3584

merged 13 commits into from
Feb 16, 2023

Conversation

john-sharratt
Copy link
Contributor

  • Removed generation_arena which was causing some serious leakages of files and sockets
  • Added OsError for NetworkErrors so that "Too Many Open Files" is properly passed
  • Local networking will now cap at 10 sockets in the backlog
  • Added the missing shutdown error code
  • Removed the inodes lock around most of the WASI syscalls
  • Fixed some race conditions in the event notifications for WASI
  • The polling loop will now only notify a closed socket once
  • Event notifications now uses Wakers rather than MPSC
  • Some socket errors now return the right codes which prevents panics in WASM
  • Fixed a bug where the file read and write guards might release the file before the lock
  • The inode seed is now much safer preventing overlaps
  • The fd seed is now much safer preventing overlaps
  • Closing files is now implicit rather than explicit reducing possibliities for error
  • Forking of file descriptors is now much simplier
  • Polling events will now be returned in random order to prevent some race conditions
  • Removed a number of memory allocations which were wasting memory and performance
  • Sockets now only copy the send and recv data once rather than multiple times

john-sharratt and others added 6 commits February 5, 2023 10:16
- Avoiding a memory copy on all socket reads and writes using a new `copy_from_slice` instead
- File openers no longer box the implementation avoiding a memory allocation on all file access
- Polling sockets rather than using an async function which significantly reduces locking contention and removes an box operation
- Futex now uses wakers rather than broadcasts which makes them more efficient and durable
- Converted many async functions into sync functions in vnet
- Sleeping no longer allocates memory
- Avoiding a number of WasiEnv clones which was impacting performance and memory efficiency
* Revert "Revert "bump inkwell to 0.1.0""

* Updated Inkwell to 0.1.1

---------

Co-authored-by: ptitSeb <[email protected]>
- Removed generation_arena which was causing some serious leakages of files and sockets
- Added OsError for NetworkErrors so that "Too Many Open Files" is properly passed
- Local networking will now cap at 10 sockets in the backlog
- Added the missing shutdown error code
- Removed the inodes lock around most of the WASI syscalls
- Fixed some race conditions in the event notifications for WASI
- The polling loop will now only notify a closed socket once
- Event notifications now uses Wakers rather than MPSC
- Some socket errors now return the right codes which prevents panics in WASM
- Fixed a bug where the file read and write guards might release the file before the lock
- The inode seed is now much safer preventing overlaps
- The fd seed is now much safer preventing overlaps
- Closing files is now implicit rather than explicit reducing possibliities for error
- Forking of file descriptors is now much simplier
- Polling events will now be returned in random order to prevent some race conditions
- Removed a number of memory allocations which were wasting memory and performance
- Sockets now only copy the send and recv data once rather than multiple times
lib/vnet/src/lib.rs Outdated Show resolved Hide resolved
lib/wasi-local-networking/src/lib.rs Show resolved Hide resolved
lib/wasi/src/fs/fd.rs Outdated Show resolved Hide resolved
lib/wasi/src/fs/inode_guard.rs Outdated Show resolved Hide resolved
lib/wasi/src/fs/inode_guard.rs Outdated Show resolved Hide resolved
@theduke theduke merged commit cbcae65 into wasix Feb 16, 2023
@theduke theduke deleted the wasix-major-fixes-and-tweaks branch February 16, 2023 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants