Patch "tracing: Use atomic64_inc_return() in trace_clock_counter()" has been added to the 5.15-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

    tracing: Use atomic64_inc_return() in trace_clock_counter()

to the 5.15-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:
     tracing-use-atomic64_inc_return-in-trace_clock_count.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 0e425654bcad941690bf4d22b97732dc54649598
Author: Uros Bizjak <ubizjak@xxxxxxxxx>
Date:   Mon Oct 7 10:56:28 2024 +0200

    tracing: Use atomic64_inc_return() in trace_clock_counter()
    
    [ Upstream commit eb887c4567d1b0e7684c026fe7df44afa96589e6 ]
    
    Use atomic64_inc_return(&ref) instead of atomic64_add_return(1, &ref)
    to use optimized implementation and ease register pressure around
    the primitive for targets that implement optimized variant.
    
    Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
    Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/20241007085651.48544-1-ubizjak@xxxxxxxxx
    Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
    Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
index 4702efb00ff21..4cb2ebc439be6 100644
--- a/kernel/trace/trace_clock.c
+++ b/kernel/trace/trace_clock.c
@@ -154,5 +154,5 @@ static atomic64_t trace_counter;
  */
 u64 notrace trace_clock_counter(void)
 {
-	return atomic64_add_return(1, &trace_counter);
+	return atomic64_inc_return(&trace_counter);
 }




[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