Re: SRCU: kworker hung in synchronize_srcu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 3, 2023 at 4:16 AM Frederic Weisbecker <frederic@xxxxxxxxxx> wrote:
>
> 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

I wasn't aware that two srcu_invoke_callbacks() for same sdp can
execute in parallel.
My understanding was, any new callback will be handled by the same kworker,
once it completes the current executing one [1]. Maybe I am missing
your point here?


[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/workqueue.c?h=v6.6-rc4#n1081

> 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.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux