From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2A96C3B1A6 for ; Fri, 14 Feb 2020 17:33:00 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E00A2168B for ; Fri, 14 Feb 2020 17:33:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="meyP0/EA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E00A2168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 32519868D0; Fri, 14 Feb 2020 17:33:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NVs2-2QfX67x; Fri, 14 Feb 2020 17:32:59 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8B1FA868CE; Fri, 14 Feb 2020 17:32:59 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7AF7DC0881; Fri, 14 Feb 2020 17:32:59 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id C577FC0177 for ; Fri, 14 Feb 2020 17:32:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B367322219 for ; Fri, 14 Feb 2020 17:32:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u-87SCNVtE+n for ; Fri, 14 Feb 2020 17:32:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by silver.osuosl.org (Postfix) with ESMTPS id D20AB2042D for ; Fri, 14 Feb 2020 17:32:56 +0000 (UTC) Received: by mail-oi1-f193.google.com with SMTP id z2so10149085oih.6 for ; Fri, 14 Feb 2020 09:32:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r3T/+drPqVBDzy4dDIKsoJJiAeaqJqa8gBBMU9TF0j8=; b=meyP0/EAE4xM0sWTSUZ+D1DR3ZKsnOGYERDXxQj5n3FFI6feJFFcdhsE6lPh/JOIhn WFpqZeJO0021eAOISu0vnKgG3G7qIScVoobWWqKTsDC0/FvfXMNp89KshorN8jyLeFb7 vjhSJ0H7wZ1cGkahdBmLwdhOEW/ocmyTpMQxhwk5LZUw+njm80oegKl1tVEjXsllpfoa OlmHq5EG9MgOXGmGrGFRgJE5NQsqNTb19B3JZPJIlr6lEdo5xi4d7Wq1Lx4OHvexK//M 3Cs2DWRscwGCewT1VBnkVPKkiSah129mRc6Ny/8YbGcmFN0Ucou99DLcHv4GanxRjsbt h+lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r3T/+drPqVBDzy4dDIKsoJJiAeaqJqa8gBBMU9TF0j8=; b=m90eo6pJJNbwnGQGhHwhUkkVMmfmynOrCU/bP5wH7kSFaUal6PSEwvk837kXku38CE FgwtDmpcLf9wSZL0EIEjArD5xohRGgopadpnalpALR7bjMZ0kEGfXvZdFqbe92kQUqXc Q7shZ0zxyfFjdeSx2ADKmlBTCXiqqIGptj8wZG1ySnxvaRoZlvO/wAWEgy3DddIQBKh0 1OgpQyVqwLUlkIObeDwmgiolIDb85srkShTSu0iBiu48p9VRfYrDAYxBn33tbbjLNao9 c2sUQCSanJMeThTtpicIcQre56Q0XWsh2ZSmlvqS2gURmTlWjxUsZxMxmCI0c1hcUfhT RT+A== X-Gm-Message-State: APjAAAVIzuRBI4xqcrWjJ8pMKGsRPm1ZggYJtcqnZAWAIOPq630n32K2 H/40sSEoKoGoIujPf6NBgD/0g+W3ZPl9maMfk+Q= X-Google-Smtp-Source: APXvYqwXFV3oz0Xk92Cy9yDHpWJY62JIDncdqegwNDG8SO9EX6zSwItBrB1gsyk1FKmbshGZVxHirQuyNLsrxwl7MY4= X-Received: by 2002:aca:5303:: with SMTP id h3mr2532180oib.109.1581701575839; Fri, 14 Feb 2020 09:32:55 -0800 (PST) MIME-Version: 1.0 References: <20200114162345.19995-1-madhuparnabhowmik04@gmail.com> <20200114165740.GB22037@ziepe.ca> <74adec84-ec5b-ea1b-7adf-3f8608838259@intel.com> <25133367-6544-d0af-ae30-5178909748b1@intel.com> In-Reply-To: From: Madhuparna Bhowmik Date: Fri, 14 Feb 2020 23:02:44 +0530 Message-ID: To: Dennis Dalessandro Cc: mike.marciniszyn@intel.com, "Paul E. McKenney" , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, rcu@vger.kernel.org, Jason Gunthorpe , Joel Fernandes , linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [Linux-kernel-mentees] [PATCH 1/3] infiniband: hw: hfi1: verbs.c: Use built-in RCU list checking X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============8940261057660517709==" Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" --===============8940261057660517709== Content-Type: multipart/alternative; boundary="00000000000091923c059e8c98e5" --00000000000091923c059e8c98e5 Content-Type: text/plain; charset="UTF-8" On Fri, Feb 14, 2020 at 10:55 PM Dennis Dalessandro < dennis.dalessandro@intel.com> wrote: > On 2/14/2020 10:43 AM, Madhuparna Bhowmik wrote: > > > > > > On Wed, Jan 15, 2020 at 12:05 AM > > wrote: > > > > From: Dennis Dalessandro > > > > > > On 1/14/2020 12:00 PM, Dennis Dalessandro wrote: > > > On 1/14/2020 11:57 AM, Jason Gunthorpe wrote: > > >> On Tue, Jan 14, 2020 at 09:53:45PM +0530, > > >> madhuparnabhowmik04@gmail.com > > wrote: > > >>> From: Madhuparna Bhowmik > > > > >>> > > >>> list_for_each_entry_rcu has built-in RCU and lock checking. > > >>> Pass cond argument to list_for_each_entry_rcu. > > >>> > > >>> Signed-off-by: Madhuparna Bhowmik > > >> > > >>> drivers/infiniband/hw/hfi1/verbs.c | 2 +- > > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > > >>> > > >>> diff --git a/drivers/infiniband/hw/hfi1/verbs.c > > >>> b/drivers/infiniband/hw/hfi1/verbs.c > > >>> index 089e201d7550..22f2d4fd2577 100644 > > >>> +++ b/drivers/infiniband/hw/hfi1/verbs.c > > >>> @@ -515,7 +515,7 @@ static inline void hfi1_handle_packet(struct > > >>> hfi1_packet *packet, > > >>> opa_get_lid(packet->dlid, 9B)); > > >>> if (!mcast) > > >>> goto drop; > > >>> - list_for_each_entry_rcu(p, &mcast->qp_list, list) { > > >>> + list_for_each_entry_rcu(p, &mcast->qp_list, list, > > >>> lockdep_is_held(&(ibp->rvp.lock))) { > > >> > > >> Okay, this looks reasonable > > >> > > >> Mike, Dennis, is this the right lock to test? > > >> > > > > > > I'm looking at that right now actually, I don't think this is > > correct. > > > Wanted to talk to Mike before I send a response though. > > > > > > -Denny > > > > That's definitely going to throw a ton of lock dep messages. It's not > > really the right lock either. Instead what we probably need to do is > > what we do in the non-multicast part of the code and take the > > rcu_read_lock(). > > > > I'd say hold off on this and we'll fix it right. Same goes for the > > qib one. > > > > Alright, thank you for reviewing. > > > > The rdmavt one though looks to be OK. I'll give it a test. > > > > Hi, > > I just wanted to follow up on this. > > Any updates? > > Also, is the bug fixed now? > > > > Thank you, > > Madhuparna > > > > Thank you, > > Madhuparna > > > > -Denny > > > > I've got a patch going through internal discussion and testing for > adding rcu read locking. > > The RDMAVT patch, I was OK with going in, I guess I just mentioned that > in a reply rather than adding an RB tag. Let me go ahead and do that. > > Thank you very much for the update and Reviewed By. Regards, Madhuparna -Denny > --00000000000091923c059e8c98e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Feb 14, 2020 at 10:55 PM Denn= is Dalessandro <dennis.d= alessandro@intel.com> wrote:
On 2/14/2020 10:43 AM, Madhuparna Bhowmik wrote:
>
>
> On Wed, Jan 15, 2020 at 12:05 AM <madhuparnabhowmik04@gmail.com
> <mailto:madhuparnabhowmik04@gmail.com>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0From: Dennis Dalessandro <dennis.dalessandro@intel.com
>=C2=A0 =C2=A0 =C2=A0<mailto:
dennis.dalessandro@intel.com>>
>
>=C2=A0 =C2=A0 =C2=A0On 1/14/2020 12:00 PM, Dennis Dalessandro wrote: >=C2=A0 =C2=A0 =C2=A0 > On 1/14/2020 11:57 AM, Jason Gunthorpe wrote:=
>=C2=A0 =C2=A0 =C2=A0 >> On Tue, Jan 14, 2020 at 09:53:45PM +0530,=
>=C2=A0 =C2=A0 =C2=A0 >> madhuparnabhowmik04@gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:madhuparnabhowmik04@gmail.com> wrote:
>=C2=A0 =C2=A0 =C2=A0 >>> From: Madhuparna Bhowmik <madhuparnabhowm= ik04@gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:madhuparnabhowmik04@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >>> list_for_each_entry_rcu has built-in = RCU and lock checking.
>=C2=A0 =C2=A0 =C2=A0 >>> Pass cond argument to list_for_each_e= ntry_rcu.
>=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >>> Signed-off-by: Madhuparna Bhowmik
>=C2=A0 =C2=A0 =C2=A0<madhuparnabhowmik04@gmail.com <mailto:madhuparnabhowmik0= 4@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0 >>> =C2=A0 drivers/infiniband/hw/hfi1/ver= bs.c | 2 +-
>=C2=A0 =C2=A0 =C2=A0 >>> =C2=A0 1 file changed, 1 insertion(+)= , 1 deletion(-)
>=C2=A0 =C2=A0 =C2=A0 >>>
>=C2=A0 =C2=A0 =C2=A0 >>> diff --git a/drivers/infiniband/hw/hf= i1/verbs.c
>=C2=A0 =C2=A0 =C2=A0 >>> b/drivers/infiniband/hw/hfi1/verbs.c<= br> >=C2=A0 =C2=A0 =C2=A0 >>> index 089e201d7550..22f2d4fd2577 1006= 44
>=C2=A0 =C2=A0 =C2=A0 >>> +++ b/drivers/infiniband/hw/hfi1/verb= s.c
>=C2=A0 =C2=A0 =C2=A0 >>> @@ -515,7 +515,7 @@ static inline voi= d hfi1_handle_packet(struct
>=C2=A0 =C2=A0 =C2=A0 >>> hfi1_packet *packet,
>=C2=A0 =C2=A0 =C2=A0 >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 opa_get_lid(packet->dlid, 9B));
>=C2=A0 =C2=A0 =C2=A0 >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (!mcast)
>=C2=A0 =C2=A0 =C2=A0 >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 goto drop;
>=C2=A0 =C2=A0 =C2=A0 >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 list_for_each_entry_rcu(p, &mcast->qp_list, list) {
>=C2=A0 =C2=A0 =C2=A0 >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 list_for_each_entry_rcu(p, &mcast->qp_list, list,
>=C2=A0 =C2=A0 =C2=A0 >>> lockdep_is_held(&(ibp->rvp.loc= k))) {
>=C2=A0 =C2=A0 =C2=A0 >>
>=C2=A0 =C2=A0 =C2=A0 >> Okay, this looks reasonable
>=C2=A0 =C2=A0 =C2=A0 >>
>=C2=A0 =C2=A0 =C2=A0 >> Mike, Dennis, is this the right lock to t= est?
>=C2=A0 =C2=A0 =C2=A0 >>
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > I'm looking at that right now actually, I= don't think this is
>=C2=A0 =C2=A0 =C2=A0correct.
>=C2=A0 =C2=A0 =C2=A0 > Wanted to talk to Mike before I send a respon= se though.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > -Denny
>
>=C2=A0 =C2=A0 =C2=A0That's definitely going to throw a ton of lock = dep messages. It's not
>=C2=A0 =C2=A0 =C2=A0really the right lock either. Instead what we proba= bly need to do is
>=C2=A0 =C2=A0 =C2=A0what we do in the non-multicast part of the code an= d take the
>=C2=A0 =C2=A0 =C2=A0rcu_read_lock().
>
>=C2=A0 =C2=A0 =C2=A0I'd say hold off on this and we'll fix it r= ight. Same goes for the
>=C2=A0 =C2=A0 =C2=A0qib one.
>
>=C2=A0 =C2=A0 =C2=A0Alright, thank you for reviewing.
>
>=C2=A0 =C2=A0 =C2=A0The rdmavt one though looks to be OK. I'll give= it a test.
>
> Hi,
> I just wanted to follow up on this.
> Any updates?
> Also, is the bug fixed now?
>
> Thank you,
> Madhuparna
>
>=C2=A0 =C2=A0 =C2=A0Thank you,
>=C2=A0 =C2=A0 =C2=A0Madhuparna
>
>=C2=A0 =C2=A0 =C2=A0-Denny
>

I've got a patch going through internal discussion and testing for
adding rcu read locking.

The RDMAVT patch, I was OK with going in, I guess I just mentioned that in a reply rather than adding an RB tag. Let me go ahead and do that.

Thank you very much for the update and Reviewed By.

Regards,
Madhuparna

<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex"> -Denny
--00000000000091923c059e8c98e5-- --===============8940261057660517709== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees --===============8940261057660517709==--