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

Consolidate client data #1014

Merged
merged 5 commits into from
Nov 20, 2023
Merged

Conversation

mkeeter
Copy link
Contributor

@mkeeter mkeeter commented Oct 30, 2023

Right now, the Crucible upstairs spends a lot of time fighting over the lock on the single Mutex<Downstairs>.

Eventually, I'd like to move data into separate per-downstairs tasks that own their data and communicate via message-passing (see oxidecomputer/omicron#4332).

This PR is a (mostly) purely mechanical step in that direction: it converts a bunch of individual ClientData<T> into a single ClientData<DownstairsClient>; basically a struct-of-arrays → array-of-structs transform. Then, functions which only use data within a single DownstairsClient are moved into members functions on that struct.

@mkeeter mkeeter requested review from jmpesp and leftwo October 30, 2023 21:24
Copy link
Contributor

@leftwo leftwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the meet and the walk through of io_state_count()

upstairs/src/lib.rs Show resolved Hide resolved
@mkeeter mkeeter force-pushed the consolidate-client-data branch from c55e5f1 to 2a9984c Compare November 16, 2023 22:29
@mkeeter mkeeter merged commit 0098383 into oxidecomputer:main Nov 20, 2023
18 checks passed
@mkeeter mkeeter deleted the consolidate-client-data branch November 20, 2023 19:41
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