]> www.infradead.org Git - users/jedix/linux-maple.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)
committerDhaval Giani <dhaval.giani@oracle.com>
Mon, 16 Jan 2017 20:11:09 +0000 (15:11 -0500)
commit95c19587a3b92324e4a65ae7d57e62575cd6c3a5
tree059bd28726ea4a930b3ac626965fb6cc6fa44a49
parent57eb15a23e555ca1df15cf96a5b49c7d83f3e415
tools/power turbostat: make fewer systems calls

Orabug: 24811361

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: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
tools/power/x86/turbostat/turbostat.c