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
UCS/ARCH: Read from cpu MHz
for CPU speed on x86
#2793
Conversation
When the user changes the frequency of the CPU, UCS still reads the base frequency on x86 for its calculations. This patch ensures that the CPU frequency is read from the `cpu MHz` field of `cpuinfo` and not from `model name`. The function that reads from the model name is removed because it is not used anywhere else and, if kept, would throw a build error. Signed-off-by: Rohit Zambre <rzambre@uci.edu>
Can one of the admins verify this patch? |
ok to test |
Can one of the admins verify this patch? |
It is okay for now but in longer term for x86 I would suggest to follow perftest approach |
Test PASSed. |
Test FAILed. |
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.
this fix is incorrect since the clock reported by "cpu MHz" in procinfo is not always accurate and may change
as discussed on conf call, suggested approach is to have "slow and accurate" and "fast and inaccurate" version of get_time |
@rzambre what is the paper that you mentioned the other day ? |
This is the paper that I was referring to: https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/ia-32-ia-64-benchmark-code-execution-paper.pdf The paper talks how to measure for architectures that do and do not support The paper's methodology also seems to be used in courses at universities: http://cseweb.ucsd.edu/classes/wi16/cse221-a/timing.html The infrastructure is basically the code snippet under the The overhead of this infrastructure is 16ns (similar to the current infrastructure), according to my measurements. Since UCS has different macros for start (SCOPE_START) and end (SCOPE_END) of timers, I think we can forward the |
Fixes #2792.