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.
Manage ticks to suppress RCU CPU stall warning #75
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
Manage ticks to suppress RCU CPU stall warning #75
Changes from all commits
cd565d0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Consider making the boot target time configurable via environment variable instead of hardcoding it in the Makefile. This would allow users to override the value without modifying the Makefile. Could use something like:
SEMU_BOOT_TARGET_TIME ?= 10
Code suggestion
Code Review Run #9f603b
Is this a valid issue, or was it incorrectly flagged by the Agent?
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.
Consider initializing
boot_ticks
andticks_increment
with meaningful default values to avoid potential undefined behavior when these variables are first accessed.Code suggestion
Code Review Run #9f603b
Is this a valid issue, or was it incorrectly flagged by the Agent?
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.
The
boot_ticks
variable is declared asdouble
but cast touint64_t
without checking for potential overflow or precision loss. Consider usinguint64_t
type consistently.Code suggestion
Code Review Run #9f603b
Is this a valid issue, or was it incorrectly flagged by the Agent?
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.
Consider using
UINT64_C(1000000000)
instead of1e9
for explicit integer constant. Using floating point literals for integer calculations could lead to precision issues.Code suggestion
Code Review Run #9f603b
Is this a valid issue, or was it incorrectly flagged by the Agent?
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.
Similar to above, consider using
UINT64_C(1000000000)
instead of1e9
in the fallback path for consistency and to avoid potential floating point precision issues.Code suggestion
Code Review Run #9f603b
Is this a valid issue, or was it incorrectly flagged by the Agent?
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.
Consider making
offset
andfirst_switch
variables thread-safe since they are static variables accessed from multiple threads. Using atomic variables would prevent potential race conditions.Code suggestion
Code Review Run #9f603b
Is this a valid issue, or was it incorrectly flagged by the Agent?