Re: [PATCH] rethook: Use tsk->on_cpu to check task execution state
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2026-06-05 13:43:46
Also in:
lkml
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2026-06-05 13:43:46
Also in:
lkml
On Thu, 4 Jun 2026 11:34:45 +0200 Peter Zijlstra [off-list ref] wrote:
On Mon, Jun 01, 2026 at 08:40:01AM +0900, Masami Hiramatsu wrote:quoted
Peter, is it OK to drop @rq from task_on_cpu()?Sure.quoted
Then we can use it from rethook.Well, it is in sched/sched.h, which is an internal header, and no you cannot use that header in rethook.
Ah, OK. Hmm, then we should not use it. Maybe ->on_cpu is also internal state?
But lets step back first, what is the actual problem here, why are we looking at ->on_cpu at all?
Tengda, can you explain it? I think you want to take a stacktrace on !current process, and rethook_find_ret_addr() is rejected i the task is running state. But if you can share actual situation what you need, it is helpful for us to understand. Thank you, -- Masami Hiramatsu (Google) [off-list ref]