Skip to content

Implement uring sock recvfrom - #4

Merged
ankitkpandey1 merged 14 commits into
mainfrom
implement-uring-sock-recvfrom
Jan 11, 2026
Merged

Implement uring sock recvfrom#4
ankitkpandey1 merged 14 commits into
mainfrom
implement-uring-sock-recvfrom

Conversation

@ankitkpandey1

Copy link
Copy Markdown
Owner

No description provided.

google-labs-jules Bot and others added 14 commits January 10, 2026 12:35
Reduced lock contention in the main event loop tick by:
1. Splitting completion processing into three phases: data extraction, future removal, and resolution.
2. Acquiring the `futures` Mutex only once per batch of completions instead of per completion.
3. Reducing the `ring` lock scope to only the submit/drain operations.

This improves CPU efficiency during high-concurrency I/O workloads.
- Implemented full UNIX socket support (Datagram, Server, Connection).
- Implemented BlockingIOError handling (buffering) for Datagrams in sock_sendto.
- Optimized sock_sendto with optimistic syscall fast-path (~831k ops/sec).
- Added comprehensive tests and updated documentation.
- Use module-level constants for buffer defaults.
- Simplify env var parsing with idiomatic .
- Refactor  to remove verbose/dead code.
- Ensure comments reflect design decisions.
- Replaced long if-elif ladder in _process_completions with O(1) dict lookup.
- Standardized all completion handler signatures to accept (fd, result, data).
- Initialized _completion_handlers map in __init__ for performance.
- Removed all internal 'SOTA' / 'Phase' jargon from Rust source comments.
- Refactored  for cleaner dispatch.
- Verified all Python modules for idiomatic code and comment quality.
- Restored 'RecvMsg' (9) and 'SendMsg' (10) variants in  enum.
- added 'ProvideBuffer' (11) and 'FixedFdTable' (12) as distinct variants.
- Updated  and  (and lib.rs match) to be exhaustive.
- Fixes compilation error caused by SOTA cleanup.
- Updated  to use dynamic ports (port 0) instead of hardcoded ports to prevent flakes.
- Added backticks to doc comments in  to satisfy clippy  lint.
- Verified all tests pass.
- Added  helper to kill stale processes on target ports before starting verification servers.
- Added  check with fallback to  for environments missing .
- Fixes flaky CI failures in  and other modes due to 'Address in use' errors.
- Export  and  in validation script.
- Reduces locked memory requirement from ~32MB to ~4MB.
- Solves  in restricted CI environments.
@ankitkpandey1
ankitkpandey1 merged commit 4dc9e8b into main Jan 11, 2026
7 checks passed
@ankitkpandey1
ankitkpandey1 deleted the implement-uring-sock-recvfrom branch January 11, 2026 05:42
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.

1 participant