On Tue, May 27, 2025 at 08:12:48PM -0400, Jeff Layton wrote: > Convert the svc_wake_up tracepoint into svc_pool_thread_event class. > Have it also record the pool id, and add new tracepoints for when the > thread is already running and for when there are no idle threads. > > Signed-off-by: Jeff Layton <jlay...@kernel.org>
... > diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c > index > e7f9c295d13c03bf28a5eeec839fd85e24f5525f..de80d3683350dc86bee3413719797dcf7a4562e8 > 100644 > --- a/net/sunrpc/svc.c > +++ b/net/sunrpc/svc.c > @@ -749,13 +749,16 @@ void svc_pool_wake_idle_thread(struct svc_pool *pool) > WRITE_ONCE(rqstp->rq_qtime, ktime_get()); > if (!task_is_running(rqstp->rq_task)) { > wake_up_process(rqstp->rq_task); > - trace_svc_wake_up(rqstp->rq_task->pid); > + trace_svc_pool_thread_wake(pool, rqstp->rq_task->pid); > percpu_counter_inc(&pool->sp_threads_woken); > + } else { > + trace_svc_pool_thread_running(pool, > rqstp->rq_task->pid); > } > rcu_read_unlock(); > return; > } > rcu_read_unlock(); Hi Jeff, Above, rqstp is conditionally initialised if ln (pool->sp_idle_threads.first) is not NULL. But below it is dereferenced unconditionally. This does not seem consistent. Reported by clang-20.1.4 builds and Smatch. > + trace_svc_pool_thread_noidle(pool, rqstp->rq_task->pid); > > } > EXPORT_SYMBOL_GPL(svc_pool_wake_idle_thread); > > -- > 2.49.0 >