-
Notifications
You must be signed in to change notification settings - Fork 69
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
Allow bulk set side metadata #808
Conversation
0f9bca9
to
081551b
Compare
/// that the data address range can be mapped to whole metadata bytes, we have to deal with cases that | ||
/// we need to mask and set certain bits in a metadata byte. | ||
/// The end address and the end bit are exclusive. | ||
pub(super) fn set_meta_bits( |
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.
Just like you parameterised bulk_update_metadata
with the update_meta_bits
parameter, you can merge set_meta_bits
and zero_meta_bits
and parameterise the setting/clearing operation with a parameter, too.
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.
Done. I added update_meta_bits
which takes two function arguments, update_bytes
and update_bits
. set_meta_bits
and zero_meta_bits
both use update_meta_bits
with different update bytes/bits closures.
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.
LGTM
This PR adds bulk set for side metadata. Similar to bulk zeroing, bulk set will set the side metadata for a given data address range to all 1s (maximum value).