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

Allow bulk set side metadata #808

Merged
merged 3 commits into from
May 9, 2023
Merged

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented May 8, 2023

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).

@qinsoon qinsoon marked this pull request as ready for review May 8, 2023 07:08
src/util/memory.rs Outdated Show resolved Hide resolved
@qinsoon qinsoon requested a review from wks May 8, 2023 08:35
/// 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(
Copy link
Collaborator

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.

Copy link
Member Author

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.

Copy link
Collaborator

@wks wks left a comment

Choose a reason for hiding this comment

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

LGTM

@qinsoon qinsoon merged commit 671b7b3 into mmtk:master May 9, 2023
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.

2 participants