Re: [PATCH] rethook: Use tsk->on_cpu to check task execution state

From: Peter Zijlstra

Date: Thu Jun 04 2026 - 05:48:47 EST


On Mon, Jun 01, 2026 at 08:40:01AM +0900, Masami Hiramatsu wrote:

> Peter, is it OK to drop @rq from task_on_cpu()?

Sure.

> 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.

But lets step back first, what is the actual problem here, why are we
looking at ->on_cpu at all?