Commit 94879bb2 authored by Len Brown's avatar Len Brown Committed by Tim Gardner
Browse files

tools/power turbostat: make fewer systems calls

BugLink: http://bugs.launchpad.net/bugs/1591802



skip the open(2)/close(2) on each msr read
by keeping the /dev/cpu/*/msr files open.

The remaining read(2) is generally far fewer cycles
than the removed open(2) system call.

Signed-off-by: default avatarLen Brown <len.brown@intel.com>
(cherry picked from commit 36229897)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Acked-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 9133d582
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment