]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
tools/power turbostat: make fewer systems calls
authorLen Brown <len.brown@intel.com>
Sat, 27 Feb 2016 01:51:02 +0000 (20:51 -0500)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 29 Aug 2016 16:24:57 +0000 (10:24 -0600)
commit94879bb29a6b88fe40dbba00a4e374251d77f184
treedd25096f08dcdea463ad28070bde211d69dc7c49
parent9133d58282dafeec4a6e0fcfb68e98d6407eae09
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: Len Brown <len.brown@intel.com>
(cherry picked from commit 36229897ba966bb0dc9e060222ff17b198252367)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
tools/power/x86/turbostat/turbostat.c