public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "yanjun.zhu" <yanjun.zhu@linux.dev>
To: "Håkon Bugge" <haakon.bugge@oracle.com>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Leon Romanovsky" <leon@kernel.org>,
	"Sean Hefty" <shefty@nvidia.com>,
	"Vlad Dumitrescu" <vdumitrescu@nvidia.com>,
	"Or Har-Toov" <ohartoov@nvidia.com>,
	"Jacob Moroni" <jmoroni@google.com>,
	"Manjunath Patil" <manjunath.b.patil@oracle.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH for-next] RDMA/cm: Rate limit destroy CM ID timeout error message
Date: Fri, 12 Sep 2025 12:27:33 -0700	[thread overview]
Message-ID: <df0d8ea8-9a4f-4de9-8bbc-ba54e19cedbf@linux.dev> (raw)
In-Reply-To: <20250912100525.531102-1-haakon.bugge@oracle.com>

On 9/12/25 3:05 AM, HÃ¥kon Bugge wrote:
> When the destroy CM ID timeout kicks in, you typically get a storm of
> them which creates a log flooding. Hence, change pr_err() to
> pr_err_ratelimited() in cm_destroy_id_wait_timeout().
> 
> Fixes: 96d9cbe2f2ff ("RDMA/cm: add timeout to cm_destroy_id wait")
> Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
> ---
>   drivers/infiniband/core/cm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
> index 92678e438ff4d..01bede8ba1055 100644
> --- a/drivers/infiniband/core/cm.c
> +++ b/drivers/infiniband/core/cm.c
> @@ -1049,8 +1049,8 @@ static noinline void cm_destroy_id_wait_timeout(struct ib_cm_id *cm_id,
>   	struct cm_id_private *cm_id_priv;
>   
>   	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
> -	pr_err("%s: cm_id=%p timed out. state %d -> %d, refcnt=%d\n", __func__,
> -	       cm_id, old_state, cm_id->state, refcount_read(&cm_id_priv->refcount));
> +	pr_err_ratelimited("%s: cm_id=%p timed out. state %d -> %d, refcnt=%d\n", __func__,
> +			   cm_id, old_state, cm_id->state, refcount_read(&cm_id_priv->refcount));

When many CMs time out, this pr_err can generate excessive noise. Using 
the _ratelimited variant will help alleviate the problem.

Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>

Zhu Yanjun

>   }
>   
>   static void cm_destroy_id(struct ib_cm_id *cm_id, int err)


  reply	other threads:[~2025-09-12 19:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-12 10:05 [PATCH for-next] RDMA/cm: Rate limit destroy CM ID timeout error message Håkon Bugge
2025-09-12 19:27 ` yanjun.zhu [this message]
2025-09-15  7:43 ` Leon Romanovsky
2025-09-15  9:44   ` Haakon Bugge
2025-09-16 14:18 ` Jason Gunthorpe
2025-09-16 14:36   ` Jacob Moroni
2025-09-25 11:29     ` Haakon Bugge
2025-10-13 14:04       ` Haakon Bugge
2025-10-15 11:38         ` Haakon Bugge
2025-10-15 16:49           ` Jason Gunthorpe
2025-10-15 18:34             ` Sean Hefty
2025-10-15 18:45               ` Jason Gunthorpe
2025-10-16 15:25                 ` Haakon Bugge
2025-10-16 16:12                   ` Jason Gunthorpe
2025-10-16 16:43                     ` Haakon Bugge
2025-10-16 18:01                       ` Jason Gunthorpe
2025-10-21 16:32                         ` Haakon Bugge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df0d8ea8-9a4f-4de9-8bbc-ba54e19cedbf@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=haakon.bugge@oracle.com \
    --cc=jgg@ziepe.ca \
    --cc=jmoroni@google.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=manjunath.b.patil@oracle.com \
    --cc=ohartoov@nvidia.com \
    --cc=shefty@nvidia.com \
    --cc=vdumitrescu@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox