Re: [RESEND PATCH] sched: restore the behavior of put_task_struct() for non-rt
From: Sebastian Andrzej Siewior
Date: Mon Aug 11 2025 - 07:05:13 EST
On 2025-08-11 12:40:34 [+0200], Oleg Nesterov wrote:
> On 08/11, Sebastian Andrzej Siewior wrote:
> >
> > I don't want to drag this but this comment is obvious for anyone who is
> > fluent in C. It is just a statement with no explanation.
> > An important note would be that the atomic context restriction only
> > apply to PREEMPT_RT and therefore we have this context override for
> > lockdep below. The other question would be why don't we do this
> > unconditionally regardless of PREEMPT_RT. The only reason I could find
> > is that releasing the task here from the "exit path" makes the vmap
> > stack "earlier" available for reuse.
>
> Sorry, could you clarify your "other" question?
>
> What exactly do you think we could do regardless of PREEMPT_RT?
Do what we do now and have one free path for task_struct regardless if
PREEMPT_RT is enabled or not. The one via RCU which delays the freeing
until after the grace period.
> Oleg.
Sebastian