From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9B113191C6 for ; Fri, 12 Sep 2025 19:27:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757705272; cv=none; b=Ketwm+oTlQzNzEHockNWU7qT5oHgbpaUJaxr8phZLHcvuCLF4DNtllGNWZcFjszlfG5NBYj47sVHuNNK3dYYPjqV9r70V4divu1GXucaqskTOQ89f+dfBx7LHsNswnThq9o8qVyReS7XtCB5wTCqvLBpn0Vpmnh2N6wosH5RTLY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757705272; c=relaxed/simple; bh=0/PSKF2to2OaJnAdRMMBgx1N67O2wxoTS8DRkJ0j+PU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=E1oG+GWdX3P7lrq4deB4PmpWbwx6DlcVr3FC1B54yT+zoLlTVorDIi99b32EcyqYt/EO0GSuTkYX9GzqyvaDXgS63leCVof9vlxZmY9Q+LThG+LOgIdwJDl4867Ly/M6T5F8H+j1BhxhO1g0WZGqz708zHSLzQqfcaRWaJOq134= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=oV1luJhK; arc=none smtp.client-ip=91.218.175.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="oV1luJhK" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1757705257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=shPyU1wloMgDISSN93FeuBHz7Metwmsu/VH9NlbZVaY=; b=oV1luJhKBvfVaz6bo/u96BOU0BShALi8KGp7Y+1muWEOLypYOj9dW+1QmoQvu5xB1miLCE UgHTJcRbD5e5kiDCLLTJFjXzKZSznx1QLP7joie1hcYIte9lGJc4dnC7xMQv3GtD9GPokY i4gwQ72GfZHQUWgV9a7CPaU+Kk5uTQY= Date: Fri, 12 Sep 2025 12:27:33 -0700 Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH for-next] RDMA/cm: Rate limit destroy CM ID timeout error message To: =?UTF-8?Q?H=C3=A5kon_Bugge?= , Jason Gunthorpe , Leon Romanovsky , Sean Hefty , Vlad Dumitrescu , Or Har-Toov , Jacob Moroni , Manjunath Patil Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250912100525.531102-1-haakon.bugge@oracle.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "yanjun.zhu" In-Reply-To: <20250912100525.531102-1-haakon.bugge@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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 > --- > 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 Zhu Yanjun > } > > static void cm_destroy_id(struct ib_cm_id *cm_id, int err)