]> www.infradead.org Git - users/willy/pagecache.git/commit
tools/power turbostat: Cache graphics sysfs file descriptors during probe
authorZhang Rui <rui.zhang@intel.com>
Thu, 14 Nov 2024 07:59:45 +0000 (15:59 +0800)
committerLen Brown <len.brown@intel.com>
Sat, 30 Nov 2024 21:42:07 +0000 (16:42 -0500)
commitc7538f33853b11d0ff2a81efb78bde125d1fc49f
treea0b6afc5619d86be109167f8f4dc7202ade025e9
parentd071004e623b7433573019d67cba79e345d83006
tools/power turbostat: Cache graphics sysfs file descriptors during probe

Snapshots of the graphics sysfs knobs are taken based on file
descriptors. To optimize this process, open the files and cache the file
descriptors during the graphics probe phase. As a result, the previously
cached pathnames become redundant and are removed.

This change aims to streamline the code without altering its functionality.

No functional change intended.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c