-
Notifications
You must be signed in to change notification settings - Fork 18
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
Track both jobs and bytes in each IO state #1507
Conversation
22a663c
to
7b7ec22
Compare
upstairs/src/client.rs
Outdated
@@ -2252,7 +2279,8 @@ impl DownstairsClient { | |||
} | |||
|
|||
pub(crate) fn total_live_work(&self) -> usize { | |||
(self.io_state_count.new + self.io_state_count.in_progress) as usize | |||
(self.io_state_job_count.new + self.io_state_job_count.in_progress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how this snuck through, but the io_state_job_count.new
has no IOState
equivalent any longer. Since your in the neighborhood can you just remove the new field from ClientIOStateCount
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, removed in 663ae0d
This will change the DTrace probe format, but it looks like no one is using ok.ds_io_count.new
upstairs/src/lib.rs
Outdated
pub error: u32, | ||
#[derive(Debug, Default, Copy, Clone, Serialize, Deserialize)] | ||
pub struct ClientIOStateCount<T = u32> { | ||
pub new: T, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the new here is now vestigial and we can remove it.
7b7ec22
to
1e4cc53
Compare
It would be helpful to track how many bytes are associated with each job state, so that we can inject
Barrier
operations if we're buffering too manyDone
bytes. This PR adds a new counter for that purpose!io_state_byte_count: ClientIOStateCount<u64>
to track number of bytes associated with each IO stateClientIOStateCount
to be generic, instead ofu32
-specificClientIOStateCount
to useIndexMut
io_state_count
toio_state_job_count
inDownstairsClient
DownstairsIO::io_size()
just call intoIOop::job_bytes()
, which does the same thing