Re: re. Spurious wakeup on a newly created kthread

Tejun Heo
2022-06-27T08:21:18Z

Hello, Michal.

On Mon, Jun 27, 2022 at 10:07:22AM +0200, Michal Hocko wrote:
> So if somebody has woken up our thread from inside kthread() then it
> doesn't have that pointer on the stack and I couldn't it find elsewhere
> either. Maybe somebody has an idea where to look at.

One way could be bpftrace'ing or printking __wake_up_common() and
friends to dump backtrace if it's trying to wake a kthread whose comm
starts with kworker/ and doesn't have (struct worker
*)kthread_data(task)->pool set.

Thanks.

--
tejun