On 2020-11-03 12:37:49 [+0100], Oleg Nesterov wrote: > On 11/02, Sebastian Andrzej Siewior wrote: > > > > On 2020-11-02 16:50:01 [+0100], Oleg Nesterov wrote: > > > > > > static void ptrace_unfreeze_traced(struct task_struct *task) > > > { > > > - if (task->state != __TASK_TRACED) > > > - return; > > > + bool frozen = true; > > > > Is this okay for !PREEMPT_RT or is this considered as an important > > fast-path on !PREEMPT_RT? > > I do not know how can ptrace_unfreeze_traced() check both ->state and > ->saved_state lockless. > > If it is possible then task_is_traced() can avoid pi_lock too? Now we can't. That lock is the only thing that guarantees consistent state. > OK, I'll send V2 in a minute. > > > This `saved_state' is only used for RT so it might make sense to avoid > > the PI-lock on non-RT. > > The same is true for ptrace_freeze_traced(), we can probably add ifdef's > but I am not sure this makes sense... Okay. Then we keep it as it for now. > Oleg. Sebastian