Re: [PATCH v2] posix-cpu-timers: clear TICK_DEP_BIT_POSIX_TIMER on clone

From: Thomas Gleixner
Date: Sat Oct 19 2024 - 16:59:21 EST


On Fri, Oct 18 2024 at 14:41, Benjamin Segall wrote:
> When we clone a new thread, we do not inherit its posix_cputimers, and

We? We neither clone something nor can we inherit anything from the
kernel. Please do not impersonate code and use passive voice.

> clear them with posix_cputimers_init. However, this does not clear the

Please denote functions with brackets, i.e. fun() so its obvious.

> tick dependency it creates in tsk->tick_dep_mask, and the handler does
> not reach the code to clear the dependency if there were no timers to
> begin with.
>
> Thus if a thread has a cputimer running before cloneing/forking, that
> hierarchy will prevent nohz_full unless they create a cputimer of their
> own.
>
> Process-wide timers do not have this problem because fork does not copy
> signal_struct as a baseline, it creates one from scratch.

And the solution to this is described where in the change log?

Thanks,

tglx