Patch "rtla/timerlat: Do not stop user-space if a cpu is offline" has been added to the 6.5-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

    rtla/timerlat: Do not stop user-space if a cpu is offline

to the 6.5-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:
     rtla-timerlat-do-not-stop-user-space-if-a-cpu-is-off.patch
and it can be found in the queue-6.5 subdirectory.

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



commit 81aef2098c153817879f21e1b8972c47a931d81c
Author: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
Date:   Fri Sep 15 15:02:32 2023 +0200

    rtla/timerlat: Do not stop user-space if a cpu is offline
    
    [ Upstream commit e8c44d3b713b96cda055a23b21e8c4f931dd159f ]
    
    If no CPU list is passed, timerlat in user-space will dispatch
    one thread per sysconf(_SC_NPROCESSORS_CONF). However, not all
    CPU might be available, for instance, if HT is disabled.
    
    Currently, rtla timerlat is stopping the session if an user-space
    thread cannot set affinity to a CPU, or if a running user-space
    thread is killed. However, this is too restrictive.
    
    So, reduce the error to a debug message, and rtla timerlat run as
    long as there is at least one user-space thread alive.
    
    Link: https://lore.kernel.org/lkml/59cf2c882900ab7de91c6ee33b382ac7fa6b4ed0.1694781909.git.bristot@xxxxxxxxxx
    
    Fixes: cdca4f4e5e8e ("rtla/timerlat_top: Add timerlat user-space support")
    Signed-off-by: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/tracing/rtla/src/timerlat_u.c b/tools/tracing/rtla/src/timerlat_u.c
index 05e310696dd5c..01dbf9a6b5a51 100644
--- a/tools/tracing/rtla/src/timerlat_u.c
+++ b/tools/tracing/rtla/src/timerlat_u.c
@@ -45,7 +45,7 @@ static int timerlat_u_main(int cpu, struct timerlat_u_params *params)
 
 	retval = sched_setaffinity(gettid(), sizeof(set), &set);
 	if (retval == -1) {
-		err_msg("Error setting user thread affinity\n");
+		debug_msg("Error setting user thread affinity %d, is the CPU online?\n", cpu);
 		exit(1);
 	}
 
@@ -193,7 +193,9 @@ void *timerlat_u_dispatcher(void *data)
 					procs_count--;
 				}
 			}
-			break;
+
+			if (!procs_count)
+				break;
 		}
 
 		sleep(1);



[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