-
Notifications
You must be signed in to change notification settings - Fork 24
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
Refactor event handling logic & Handle the data abort case #394
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bitboom
force-pushed
the
refactor-event
branch
4 times, most recently
from
November 19, 2024 04:38
7201b4f
to
c2a5ee8
Compare
bitboom
changed the title
[DO-NOT-MERGE] Refactor event handling logic for Pinned Page Table
Refactor event handling logic & Handle the data abort case
Nov 19, 2024
bitboom
requested review from
lkh8291,
nook1208,
zpzigi754,
bokdeuk-jeong,
jinbpark and
hihi-wang
November 19, 2024 06:13
jinbpark
reviewed
Nov 19, 2024
jinbpark
approved these changes
Nov 20, 2024
hihi-wang
reviewed
Nov 20, 2024
hihi-wang
approved these changes
Nov 20, 2024
zpzigi754
approved these changes
Nov 20, 2024
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 refactoring!
zpzigi754
reviewed
Nov 20, 2024
nook1208
approved these changes
Nov 21, 2024
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.
nice refactoring !
Problem: - RMM handles two types of events: RSI and RMI, but RMI handler was located in the mainloop while RSI handler was part of RMM. - The mainloop, created and managed by RMM, had a cyclic dependency as the RMI handler in the mainloop referenced the monitor. - Handling RMI in the mainloop also required locking the event queue, leading to performance issues. Patch: - Centralized both RMI and RSI event handlers within RMM for consistent event management. - Refactored mainloop to only poll for RMI events, following SRP principles. - Removed mutual references between mainloop and monitor, breaking the cyclic dependency. - Eliminated the need for queue locking by shifting event handling to RMM, improving performance. Signed-off-by: Sangwan Kwon <[email protected]>
`event::Context` is a data structure that contains only the necessary context for event handling, separate from RMI processing. By allowing the monitor to directly own the handler and process the events (RMI, RSI), the roles of each structure are clarified, reducing unnecessary handler passing. Signed-off-by: Sangwan Kwon <[email protected]>
Signed-off-by: Sangwan Kwon <[email protected]>
Signed-off-by: Sangwan Kwon <[email protected]>
Signed-off-by: Sangwan Kwon <[email protected]>
bitboom
force-pushed
the
refactor-event
branch
from
November 21, 2024 01:19
c2a5ee8
to
a3b13ca
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR
NOTE: I will submit the PR for managing the Page Table as a pinned object separately, as it is experimental.
Refactor event handling logic
Problem
but RMI handler was located in the mainloop while RSI handler was part of RMM.
as the RMI handler in the mainloop referenced the monitor.
leading to performance issues.
Patch