Le Mon, Oct 02, 2023 at 07:51:10AM +0530, Neeraj upadhyay a écrit :
> > And if this works, can we then remove srcu_invoke_callbacks() self-requeue?
> > If queued several times before it actually fires, it will catch the latest
> > grace period's end. And if queued while the callback runs, it will re-run.
> >
> 
> This makes sense, but not sure for non-wq context which  link [1] mentions,
> whether it needs it.
> 
> > Also why do we have sdp->srcu_invoke_callbacks ? Is that workqueue 
> > re-entrant?
> >
> I think you mean sdp->srcu_cblist_invoking ?
> 
> There was a prior discussion on this [1], where Paul mentions about
> non-wq context.

Actually I realize that if we remove that, then two srcu_invoke_callbacks()
can race in such a way that an srcu barrier callback may execute before the
callbacks it is supposed to follow. And if we must keep
sdp->srcu_cblist_invoking then we must also keep self-requeuing.

I'll add a comment about that instead of removing.

Thanks.


> 
> 
> 
> Thanks
> Neeraj
> 
> [1] https://lkml.org/lkml/2020/11/19/1065
> 
> > Thanks.

Reply via email to