Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3116767rdh; Thu, 28 Sep 2023 03:12:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEI1/qrMcCqubidW0V3Di0xoQczi24HSy0SvSqiR6Vxr6PAluPWR4OuMs+OWRcVs1l51tEY X-Received: by 2002:a17:902:7445:b0:1c5:ce3c:c399 with SMTP id e5-20020a170902744500b001c5ce3cc399mr769002plt.39.1695895972284; Thu, 28 Sep 2023 03:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695895972; cv=none; d=google.com; s=arc-20160816; b=mFYaWooEyRynObNxqcjsSK5f/HZ9efluwHJtG178eqresqNI+Q+KyfINH2EeEJ18+4 2SoljJcoV+WTdoCx48pTwuNvSI43PkWHtPDySTkMv77+hKfNR1uQCAiedikZT8uM0Knp 40WfJVGNKuh/xa1AeTlcVCFpHdkMZ97Gux93U2X9/MUalDOID8W1+qsGTxJw25mKzhax EXINcvvE3w3BYUIDHWQ/3JACQqWkQ4FtqFsomDNCnvKhAjIeCuLXLT2SwaxS6Qg7bzKI NVYJS+qRfB0roXEq2HgnV83C2Yzei9cynS0mdQkr7lU3RalHlwJn+WeQBpvoMamOgUag 36cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=22UShF7jeHx6bH8WM6tJC0TDUD/x9YycDw+rjumdL/4=; fh=cTfdVF6Eeh1OD2L7Dh1JxL6Ylfe4ecQqOYsHh8gv7gE=; b=bW+MBsX5DPBV2vHNJ94ZZjbjpwJGjqmxnQRdnuosRysyucTQkfGHvS6OprnGghVI6Z UBYZjCEd5T39hjqkL9fok77LnSKcgrdpTF0Xz0qeHCMZz2xv1nID0UblBAUemho9H5oU LGL2HXfovQrqESTVf8dZCmhAl6z+55GnNqpeWAhird3ZcX6574aDZTewW/XlVO9VW2Ee rZUgrbhv01YwvVvtgMqui/bf3+gS2VhtsQfzzFJ8kBCL5Bj2Ry7pttDToc5/28fbPyWK oB/cbfPVJYlvoPvPzVN8kNMW5BaLTU3j1oZXG2yH2F1FhEvq1y2mO87iPOBbP2W4tnrL qISQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xlytmlj9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h17-20020a170902f7d100b001bb809b68a8si16593455plw.229.2023.09.28.03.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 03:12:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xlytmlj9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3F0C18106798; Thu, 28 Sep 2023 02:59:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230341AbjI1J70 (ORCPT + 99 others); Thu, 28 Sep 2023 05:59:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbjI1J7X (ORCPT ); Thu, 28 Sep 2023 05:59:23 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0D95122; Thu, 28 Sep 2023 02:59:21 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6EF7C433C8; Thu, 28 Sep 2023 09:59:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695895161; bh=tCj69rQ1Q5lfIC6/ivOgCugvo39cJ/EsMPYJ7RmeyFc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xlytmlj91HLCEsq+Mf5zEVpHyWAClLWRMZ/ACzei++dE873OsAO2QIB2bGL9bThrA aSM98LEZ/pqgeffJjQVXVVxGXnOtuqKaWWHgwD4QqWL/jHmU4s3UCqfaCqtD3vU4eZ cgTfGNA4uQfetGFfT9/+y/cGvU9a6Fx5Mt+1dEVG3BdnCWmnE+pLI1InFT81CMZuXz FR2zri3pHDwEhXIqTfrbVpVdNjzDCIL1OCAJafmFnR77i7iJQh8hdBSHgJZsuygIIh SR0njo2nFPNopBm45+Kg/kPuF3xOP1BmnHaUwgQDhFJy7YuQMYG3oTcGNb3tBuc5g3 rIGRa3kC3j4+g== Date: Thu, 28 Sep 2023 12:59:16 +0300 From: Leon Romanovsky To: Stephen Rothwell Cc: Doug Ledford , Jason Gunthorpe , Linux Kernel Mailing List , Linux Next Mailing List , Michael Guralnik , Shay Drory Subject: Re: linux-next: manual merge of the rdma tree with the rdma-fixes tree Message-ID: <20230928095916.GS1642130@unreal> References: <20230928113851.5197a1ec@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230928113851.5197a1ec@canb.auug.org.au> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 28 Sep 2023 02:59:35 -0700 (PDT) On Thu, Sep 28, 2023 at 11:38:51AM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the rdma tree got a conflict in: > > drivers/infiniband/hw/mlx5/mr.c > > between commit: > > 374012b00457 ("RDMA/mlx5: Fix mkey cache possible deadlock on cleanup") > > from the rdma-fixes tree and commit: > > 57e7071683ef ("RDMA/mlx5: Implement mkeys management via LIFO queue") > > from the rdma tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. > > -- > Cheers, > Stephen Rothwell > > diff --cc drivers/infiniband/hw/mlx5/mr.c > index 433f96459246,b0fa2d644973..000000000000 > --- a/drivers/infiniband/hw/mlx5/mr.c > +++ b/drivers/infiniband/hw/mlx5/mr.c > @@@ -1025,21 -998,15 +999,21 @@@ void mlx5_mkey_cache_cleanup(struct mlx > if (!dev->cache.wq) > return; > > - cancel_delayed_work_sync(&dev->cache.remove_ent_dwork); > mutex_lock(&dev->cache.rb_lock); > + dev->cache.disable = true; > for (node = rb_first(root); node; node = rb_next(node)) { > ent = rb_entry(node, struct mlx5_cache_ent, node); > - xa_lock_irq(&ent->mkeys); > + spin_lock_irq(&ent->mkeys_queue.lock); > ent->disabled = true; > - xa_unlock_irq(&ent->mkeys); > + spin_unlock_irq(&ent->mkeys_queue.lock); > - cancel_delayed_work_sync(&ent->dwork); > } > + mutex_unlock(&dev->cache.rb_lock); > + > + /* > + * After all entries are disabled and will not reschedule on WQ, > + * flush it and all async commands. > + */ > + flush_workqueue(dev->cache.wq); > > mlx5_mkey_cache_debugfs_cleanup(dev); > mlx5_cmd_cleanup_async_ctx(&dev->async_ctx); Thanks for the fix.