Repository navigation
Serve broker calls on per-call lanes - #1688
Merged
Merged
Conversation
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/broker-lanes
branch
7 times, most recently
from
October 22, 2026 15:46
de536d2 to
d694a00
Compare
Replace the userland broker's shared request/response rings and receiving-role hand-off with call lanes. A control ring now holds several single-slot request/response lanes; a runner call claims the lowest free lane, and the broker serves each lane on its own worker, started when the runner first uses the lane. The association thread serves the first lane itself, and an observer thread starts further workers and cancels requests once the association ends. The VM transport keeps the single-lane layout, which is byte-identical to the previous one. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
The lane observer now applies owner-death handling as soon as it observes the association's end, so a request waiting for a child to start, such as StartChild on the first lane, is released and the child fails as before. Having ended the association, the observer then joins the workers it started. Calls accept a response only while the association is live, and the runner test broker ends its association when a lane thread panics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Accept a call's response and free its lane in one admission critical section, so a call still cannot succeed after the association fails without taking an extra lock per call. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
The field now matches its lane_count accessor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Count fields and locals in the call-lane pool and the broker's lane demand now end in _count, and the shared demand word is the demanded lane count rather than requested lanes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
BrokerControlRingEndpoints, BrokerControlRingLane, BrokerLaneDemand and into_broker become HostControlRingEndpoints, HostControlRingLane, HostLaneDemand and into_host, matching the Local/Host pairing the channel traits and platform transports use. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e8b6cad-28c2-46d9-aef5-95cf4a401fb7
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/broker-lanes
branch
from
October 25, 2026 21:04
4fadd08 to
c368b7d
Compare
|
🤖 SemverChecks 🤖 Click for details |
This file contains hidden or 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
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 replaces the userland broker's shared request/response rings, pending-call registry, and receiving-role hand-off between broker workers with per-call lanes. Each runner call claims the lowest free single-slot lane in the control ring, and the broker lazily starts one worker per demanded lane, so concurrent guest calls no longer contend on shared rings or rely on another thread to receive for them. The Linux and Windows transports adopt the multi-lane layout; the VM-kernel transport keeps a byte-identical single-lane layout. No call succeeds after its association fails.