Thread (3 messages) 3 messages, 3 authors, 2d ago

Re: [PATCH] tracing: Fix context switch counter truncation

From: Breno Leitao <leitao@debian.org>
Date: 2026-07-20 09:25:01
Also in: lkml, stable

On Fri, Jul 17, 2026 at 10:32:52AM -0700, Usama Arif wrote:
This affects long-running systems and workloads with high context-switch
rates. A CPU switching 1,000 times per second takes about 50 days.
nr_context_switches_cpu() returns "unsigned long long"
and rq->nr_switches is u64, so the unsigned int cnt truncation is real
Fixes: 64cf7d058a00 ("tracing: Have trace_marker use per-cpu data to read user space")
Cc: stable@vger.kernel.org
Reported-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Usama Arif <usama.arif@linux.dev>
Reviewed-by: Breno Leitao <leitao@debian.org>

Thanks for the investigation and fix,
--breno
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help