Skip to content

Allocate broker shared-buffer slots#1068

Merged
wdcui merged 16 commits into
uliteboxfrom
wdcui/ulitebox/broker-shared-buffer-leases
Jul 23, 2026
Merged

Allocate broker shared-buffer slots#1068
wdcui merged 16 commits into
uliteboxfrom
wdcui/ulitebox/broker-shared-buffer-leases

Conversation

@wdcui

@wdcui wdcui commented Jul 22, 2026

Copy link
Copy Markdown
Member

Adds operation-scoped shared-buffer descriptors and a FIFO allocator for the 16 local slots. Local callers reserve a slot until response consumption, and the host validates slot use with non-wrapping request IDs. This removes association-wide payload serialization; host execution remains serial until the next PR.

wdcui and others added 16 commits July 22, 2026 15:58
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Use each slot's last non-wrapping broker request ID to reject stale reuse instead of carrying a separate generation in shared-buffer descriptors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Represent each slot as unused, idle, or active with a single request ID, and remove the redundant claim token.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Validate shared-buffer descriptors against their layout, and keep the pipe transfer limit in pipe-specific request handling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Move slot selection and descriptor allocation onto the locked allocator state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Keep waiter wakeup outside the allocator lock without staging an optional result.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Select the next available shared-buffer slot with masked trailing-zero scans instead of iterating over every slot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
@wdcui wdcui changed the title Lease broker shared-buffer slots Allocate broker shared-buffer slots Jul 23, 2026
@wdcui
wdcui added this pull request to the merge queue Jul 23, 2026
Merged via the queue into ulitebox with commit c7e4783 Jul 23, 2026
7 of 8 checks passed
@wdcui
wdcui deleted the wdcui/ulitebox/broker-shared-buffer-leases branch July 23, 2026 00:32
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_broker_local::BrokerLocal::read_pipe takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4651484ee3ab7783244ff9be170cf13a9d7bc816/litebox_broker_local/src/pipe.rs:47, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_broker_local/src/pipe.rs:49
  litebox_broker_local::BrokerLocal::write_pipe takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4651484ee3ab7783244ff9be170cf13a9d7bc816/litebox_broker_local/src/pipe.rs:90, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_broker_local/src/pipe.rs:94

--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field WritePipeRequest.buffer in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:53
  field ReadPipeRequest.buffer in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:37

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field length of struct ReadPipeRequest, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4651484ee3ab7783244ff9be170cf13a9d7bc816/litebox_broker_protocol/src/pipe.rs:36
  field length of struct WritePipeRequest, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4651484ee3ab7783244ff9be170cf13a9d7bc816/litebox_broker_protocol/src/pipe.rs:52

--- failure trait_method_missing: pub trait method removed or renamed ---

Description:
A trait method is no longer callable, and may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-item-signature
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/trait_method_missing.ron

Failed in:
  method with_serialized_payload of trait LocalControlChannel, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/4651484ee3ab7783244ff9be170cf13a9d7bc816/litebox_broker_protocol/src/channel.rs:69

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