[PATCH][v3] rtnetlink: add rtnl_lock debug log

Cong Wang xiyou.wangcong at gmail.com
Wed May 12 09:15:06 PDT 2021


On Wed, May 12, 2021 at 1:38 AM Rocco.Yue <rocco.yue at mediatek.com> wrote:
>
> On Tue, 2021-05-11 at 10:00 -0700, Cong Wang wrote:
> > On Tue, May 11, 2021 at 4:46 AM Rocco yue <rocco.yue at mediatek.com> wrote:
> > >
> > > From: Rocco Yue <rocco.yue at mediatek.com>
> > >
> > > We often encounter system hangs caused by certain process
> > > holding rtnl_lock for a long time. Even if there is a lock
> > > detection mechanism in Linux, it is a bit troublesome and
> > > affects the system performance. We hope to add a lightweight
> > > debugging mechanism for detecting rtnl_lock.
> >
> > Any reason why this is specific to RTNL lock? To me holding
> > a mutex lock for a long time is problematic for any mutex.
> > I have seen some fs mutex being held for a long time caused
> > many hung tasks in the system.
> >
> > Thanks.
>
> Thank you for a good question.
>
> It's a problem to hold rtnl_lock for a long time, and other locks are no
> exception.

Then please try to make it generic so that other mutex locks will
benefit too.

Thanks.



More information about the Linux-mediatek mailing list