-
Notifications
You must be signed in to change notification settings - Fork 26
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
Adds timestamped polling #174
Open
rountree
wants to merge
16
commits into
LLNL:main
Choose a base branch
from
rountree:polling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
The type of (((struct class *)0)->devnode) has changed at least twice in the mainline kernel. Coding based on mainline kernel versions has repeatedly run into the problem of distros backporting features to older kernels. Solved here using _Generic and multiple function definitions.
Compiling under Linux 6.9.9 and gcc 10.3.1.
msr_version.h #defines for major, minor, and patch versions of msr-safe as well as helper macros to generate _u32 and string representation. Makefile Removes CURRENT_VERSION and -DVERSION from build. msrsave now gets the version string from msr_version.h msrsave_main.c msr_entry.c Now #includes msr_version.h and uses MSR_SAFE_VERSION_STR msr_safe.h Repurposes a bit of struct padding to hold a _u32-format msr-safe version number. README.md Updates documentation of struct msr_batch_array to note the new version field. Explains how this will remain unused in the 1.x.y series. Version 2.x.y will begin checking this version field to make sure what the user compiled against is the same version as the loaded kernel module. This is necessary due to anticipated batch API changes in version 2.0.0. Tested on serif (Ubuntu 24.04.1 LTS, Linux 6.8.0, gcc 13.2.0)
README.md Describes new error (ENOPROTOOP) that results from a mismatch between the loaded kernel module and what's in the batch request. examples/example.c Updated to use versioning. msr_batch.c Checks for correct version as part of batch request parsing. msr_version.h Bumped version to 2.0.0. Tested on serif.
README.md Added desription of new msr_batch_op struct. Removed example code that no longer compiles in v2.0. examples/example.c Modified to be working example of polling via batch. msr-smp.c Replaced previous read/write code with read/write/poll + timestamp msr_batch.c Small patch to keep allowlist functional. msr_safe.h New op struct.
Documentation not updated Previous code only commented out, not removed.
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.
Fixes #173.
Adds polling.
Tested on serif.
The example code needs work and the README.md needs a cleanup pass.