Received: by 2002:a05:6500:1b8a:b0:1ef:a0f1:aef6 with SMTP id df10csp40056lqb; Sun, 10 Mar 2024 04:18:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfnpiSouVSG9kFJTd1nkkXKZAwsIuGKHcAM4M0Rk5wCIYguFBepH89oU67f+xqd7To+TCPFcUyiu1mMmDg5iHFbW3O4/mxY+X3F8XgOw== X-Google-Smtp-Source: AGHT+IFYZKyIYocW3q8JDZy2NAWtRz+HWzhU2udKBYoEkK6QdhfkbYBqnBI//QA3PDXK6+W7vana X-Received: by 2002:a05:6512:1184:b0:513:55ec:71be with SMTP id g4-20020a056512118400b0051355ec71bemr2365661lfr.30.1710069480624; Sun, 10 Mar 2024 04:18:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710069480; cv=pass; d=google.com; s=arc-20160816; b=CQEp7ez3zeJM5/7Jzxlnx9daqQB+Du0ZnZmmzB0aqG/EuPiJvpVjgGBL8xrgbiiiJj wDW893bAFgAyZNN06poFYKKbvw6n7Yz3T7KdwyE/089Wtz5bLVUKtG5bGxDsvVT/ahfJ IvHtWi+qNADHhkCaDrpw/hk3giUL7i6j5XAM2Jl52Bddf0MRDPMMPNllRYVZe5AdPHow jx+QVT6fxj5uBjc7HfFX2JI/1eSowTgrSywxMfHZAgP2YTEwlpQpy/W02WyzZa0VkEv/ NWs1cv8XVS9YAW5NFQlPDyAPP6zQSZwm6cJ4GA5zTqvfx5x33yRHesomiPbYBHYWbtdi A8/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EqrrMzMLbFvWreGhP2qm+Z3zvpzjdu5XjuDF7ZL3X7A=; fh=sY6Zxj0M70Ie/KOvImrlWQYqXkUrLm5RZLajzrxcZ6k=; b=YxaxomLb3dWyp+9uQrJTqR0IbbBkXTjqeL3QOXlRuswDxdjM/Db0YbHu9yH/FzgcIr s/lmDIvggVUorXCwdPVeUDetXYtsvBCqUKrzJR1k34j6eJULIXwucGP7wLnLC5gvACcM ocZONYk7u0J8pixQwuOY4NioGoz973VNm3x1d3B65uDhrOC2+QqG8FMECYnInoMVtvOz SRoUBG9PrylD6EbDFOasd0fUzfKEGXygaPjcbSBOm3cJ4Ni0uD6X/IA+pyhRYCTMXXWf 31OZdBc3lbhsxa18gOHcqbd4K3uTJxcvdHI0TAXSmMJvOoFk13EEMsvdUgGwxzAvWpc8 hdhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IZ1ja7vZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98186-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98186-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a25-20020a170906245900b00a4336908b69si1500997ejb.924.2024.03.10.04.18.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 04:18:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98186-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IZ1ja7vZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98186-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98186-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4E89F1F219D2 for ; Sun, 10 Mar 2024 11:18:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 654001F170; Sun, 10 Mar 2024 11:17:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IZ1ja7vZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7405FEEDD; Sun, 10 Mar 2024 11:17:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710069469; cv=none; b=bONzzhV9IlkjYZneU1JXMo+RlqyLRHafr1yZaje5Ol/TCtRlW5dAvdmRr4iIHbL96KQ/hLJ3aR4IbNFqzMkXprAwm4s4c/PDECtxob+tAXOL4bdEJpbFNPnPMa/go6ONmCTFp27C+jYNpNEnWKbfl8I2xwNQ0YeljjxZfkNaD5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710069469; c=relaxed/simple; bh=3s1ZmveQR14tT13H4TyNz+vgrxtLD79xkbyvkzcU1+E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PNVA+svzL6yRJZzU0krQEbdhLUA7UdjdjdN+KckGzrFcOEBLOi/dmSQvCmM0L7GM96/U0Au/Se0lQKu7MZTtFTB1sP0n4SdtX2inGunNZlf2Kldd4PL2oydiamQhs8ngXaBObJX2SOaM5oAW36oQKOm4t5uqVawkdhvIXzqmE0c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IZ1ja7vZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64BE5C433F1; Sun, 10 Mar 2024 11:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710069468; bh=3s1ZmveQR14tT13H4TyNz+vgrxtLD79xkbyvkzcU1+E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IZ1ja7vZkyLjEP1jHyBw9XoAqfauKPAxHyRr3nkVN6LzcREvSIkONg/zUKvs3hdNk oGzfRqK07qiV9ld0H8ywEk3FkGXwUqRYyajvJaEp4aWPXqeCTaqFusiPPT6zy/NG3k QJkmBsA5RR3t4TxLwu2H+3995AArWpMOQ5eOHEas3Ur49+LSxIxivivl3NHlbCtelB WUmKbGkrrCl9Sc601XU42UsLgbFiZR0qCZ7YcQGjoc7W0PhNu47d9+AIIIlQRIgqzC cZ5WVwwKBgko3j5MSbdzPEKPlG0SxpODviGM5uBXDhYlk7hmmUj5pLZKWD7hK0gr+z ROHseIkJ2j+jw== Date: Sun, 10 Mar 2024 13:17:44 +0200 From: Leon Romanovsky To: Manjunath Patil Cc: dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, rama.nichanamatlu@oracle.com Subject: Re: [PATCH v3] RDMA/cm: add timeout to cm_destroy_id wait Message-ID: <20240310111744.GE12921@unreal> References: <20240309063323.458102-1-manjunath.b.patil@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240309063323.458102-1-manjunath.b.patil@oracle.com> On Fri, Mar 08, 2024 at 10:33:23PM -0800, Manjunath Patil wrote: > Add timeout to cm_destroy_id, so that userspace can trigger any data > collection that would help in analyzing the cause of delay in destroying > the cm_id. > > New noinline function helps dtrace/ebpf programs to hook on to it. > Existing functionality isn't changed except triggering a probe-able new > function at every timeout interval. > > We have seen cases where CM messages stuck with MAD layer (either due to > software bug or faulty HCA), leading to cm_id getting stuck in the > following call stack. This patch helps in resolving such issues faster. > > kernel: ... INFO: task XXXX:56778 blocked for more than 120 seconds. > ... > Call Trace: > __schedule+0x2bc/0x895 > schedule+0x36/0x7c > schedule_timeout+0x1f6/0x31f > ? __slab_free+0x19c/0x2ba > wait_for_completion+0x12b/0x18a > ? wake_up_q+0x80/0x73 > cm_destroy_id+0x345/0x610 [ib_cm] > ib_destroy_cm_id+0x10/0x20 [ib_cm] > rdma_destroy_id+0xa8/0x300 [rdma_cm] > ucma_destroy_id+0x13e/0x190 [rdma_ucm] > ucma_write+0xe0/0x160 [rdma_ucm] > __vfs_write+0x3a/0x16d > vfs_write+0xb2/0x1a1 > ? syscall_trace_enter+0x1ce/0x2b8 > SyS_write+0x5c/0xd3 > do_syscall_64+0x79/0x1b9 > entry_SYSCALL_64_after_hwframe+0x16d/0x0 > > Orabug: 36280065 Not related to the upstream. > > Signed-off-by: Manjunath Patil > --- > v3: > - added #define > > v2: > - removed sysctl related code > > drivers/infiniband/core/cm.c | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c > index ff58058aeadc..793103cf8152 100644 > --- a/drivers/infiniband/core/cm.c > +++ b/drivers/infiniband/core/cm.c > @@ -34,6 +34,7 @@ MODULE_AUTHOR("Sean Hefty"); > MODULE_DESCRIPTION("InfiniBand CM"); > MODULE_LICENSE("Dual BSD/GPL"); > > +#define CM_DESTORY_ID_WAIT_TIMEOUT 10000 /* msecs */ CM_DESTORY_ID_WAIT_TIMEOUT -> CM_DESTROY_ID_WAIT_TIMEOUT Fixed and applied. Thanks