[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240911132517.GH4026@unreal>
Date: Wed, 11 Sep 2024 16:25:17 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Junxian Huang <huangjunxian6@...ilicon.com>
Cc: jgg@...pe.ca, linux-rdma@...r.kernel.org, linuxarm@...wei.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH for-next 3/9] RDMA/hns: Fix cpu stuck caused by printings
during reset
On Wed, Sep 11, 2024 at 09:34:19AM +0800, Junxian Huang wrote:
>
>
> On 2024/9/10 21:09, Leon Romanovsky wrote:
> > On Fri, Sep 06, 2024 at 05:34:38PM +0800, Junxian Huang wrote:
> >> From: wenglianfa <wenglianfa@...wei.com>
> >>
> >> During reset, cmd to destroy resources such as qp, cq, and mr may
> >> fail, and error logs will be printed. When a large number of
> >> resources are destroyed, there will be lots of printings, and it
> >> may lead to a cpu stuck. Replace the printing functions in these
> >> paths with the ratelimited version.
> >
> > At lease some of them if not most should be deleted.
> >
>
> Hi Leon,I wonder if there is a clear standard about whether printing
> can be added?
I don't think so, but there are some guidelines that can help you to do it:
1. Don't print error messages in the fast path.
2. Don't print error messages if other function down in the stack already
printed it.
3. Don't print error messages if it is possible to trigger them from
unprivileged user.
...
>
> Thanks,
> Junxian
>
> > Thanks
Powered by blists - more mailing lists