-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix some issues causing errors in TiKV on my machine #1
Conversation
Interesting, sysinfo doesn't provide such information. Do you mind if I take your code? I won't put keep them as standalone functions but put them into the |
Signed-off-by: Nick Cameron <[email protected]>
Signed-off-by: Nick Cameron <[email protected]>
can we add test for different kernel in CI? |
I think we can, but it would increase resource use by a large amount. We should probably be testing on CentOS 8 as well as 7 + most recent and most recent LTE Ubuntu. It think with those distros we'll cover all kernel versions that are important. However, if we run the full test suite, etc. that is a 4x increase in resources. |
@@ -277,6 +277,19 @@ pub fn get_cpu_frequency() -> u64 { | |||
.unwrap_or_default() | |||
} | |||
|
|||
/// Returns the brand/vendor string for the first CPU (which should be the same for all CPUs). | |||
pub fn get_vendor_id() -> String { |
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.
do we have a test to cover it in CI?
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.
Not yet.
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
BTW, I released a new version of sysinfo with new functionalites (such as "get_vendor_id"). You might want to take a look. |
@GuillaumeGomez Thanks, @nrc, it seems this PR does not necessary anymore. |
I'm running an AMD machine with Linux kernel version 5.3. This causes two issues:
stat
entries in/sys/block/
have 15 columns instead of 11. This is a backwards compatible change, so we can just ignore the extra four columns.vendor_id
of the CPU.These are addressed in the first and second commits, respectively.
PTAL @lonng