Patch "tools/power turbostat: Fix /dev/cpu_dma_latency warnings" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tools/power turbostat: Fix /dev/cpu_dma_latency warnings

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-power-turbostat-fix-dev-cpu_dma_latency-warnin.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7b1873aca600b79103cf3018af357f0fb4db80cf
Author: Prarit Bhargava <prarit@xxxxxxxxxx>
Date:   Thu Dec 15 10:18:16 2022 -0500

    tools/power turbostat: Fix /dev/cpu_dma_latency warnings
    
    [ Upstream commit 40aafc7d58d3544f152a863a0e9863014b6d5d8c ]
    
    When running as non-root the following error is seen in turbostat:
    
    turbostat: fopen /dev/cpu_dma_latency
    : Permission denied
    
    turbostat and the man page have information on how to avoid other
    permission errors, so these can be fixed the same way.
    
    Provide better /dev/cpu_dma_latency warnings that provide instructions on
    how to avoid the error, and update the man page.
    
    Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>
    Cc: linux-pm@xxxxxxxxxxxxxxx
    Signed-off-by: Len Brown <len.brown@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/power/x86/turbostat/turbostat.8 b/tools/power/x86/turbostat/turbostat.8
index c7b26a3603afe..3e1a4c4be001a 100644
--- a/tools/power/x86/turbostat/turbostat.8
+++ b/tools/power/x86/turbostat/turbostat.8
@@ -344,6 +344,8 @@ Alternatively, non-root users can be enabled to run turbostat this way:
 
 # chmod +r /dev/cpu/*/msr
 
+# chmod +r /dev/cpu_dma_latency
+
 .B "turbostat "
 reads hardware counters, but doesn't write them.
 So it will not interfere with the OS or other programs, including
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index aba460410dbd1..c24054e3ef7ad 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -5482,7 +5482,7 @@ void print_dev_latency(void)
 
 	retval = read(fd, (void *)&value, sizeof(int));
 	if (retval != sizeof(int)) {
-		warn("read %s\n", path);
+		warn("read failed %s\n", path);
 		close(fd);
 		return;
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux