Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp771857pxb; Mon, 8 Nov 2021 23:15:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeSsQ9e447eDX8xpsG2jEwgVJVlyny5vQXWhlLfSYpv4fignT7mNpy39tuOQ2EZMg4trnN X-Received: by 2002:a05:6e02:216e:: with SMTP id s14mr3971004ilv.76.1636442155361; Mon, 08 Nov 2021 23:15:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636442155; cv=none; d=google.com; s=arc-20160816; b=lUZx1dNYp/Y27LnsLBK7FTsMHVfYWW8Nr5iXk3/upqBvOvtVikewTMVMcR1kRT23bj 1Zs74NE7fBEBC/2MvkR3W4IBeyAbhc2oVhynLUNv1d85iP09aUpsm876OEGGbIJuKnI4 /lEiLCiFTomeZvSu8e/QOljNo07iSN4ErbQXJKgzqA4but3D6/ap5uDXNA53TeVZrfkV /RvGQeSyzR0o8eBw8qNzfG6Ucdj9QYNSOnofE0wK8V2gDmmDlxSAVRILaHb1JCkeDWlZ qnS0U6LKUUviIc0VDuxkplT5AlS8+uAsCshmN3FbY1vgVRwfQCCDEQ9CJaAzJaTB8lJg w+KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=6Dbaj9t7vvT0UgIM/YCU+Uo/fduBP+7T/K6fLcEeP1c=; b=ldV2fmI1u7WQ4GngeBH4A7ISzLfDhs4iHmCZXEJj614qf3d8fnNr3hsr2gWi9+FIhC emoLuYGDBbkzmp1sHU0x0CMjYLfX7eZj8iq1VHumhNMpyae17nNNfL2NHZlwZedpFeqa 989UKT8nWmmHbGW2hbU93tH8xeySE82jG8kZMs7UzX3U8+6wi2gLnGc2iLM/VI3KKQqw n1ywzLVye1NDc+Jr/NQnQEr0oQYYiLJReOiQtdu2gOBy25oIlMiyZ+vsAwN48AkkHp0A 5PeHCeZLw9uk1Szde9l7QEHHvsIo3x7sVdFpcQiI84FmHKzJ+3zLytZVotzWRkIKk278 eLsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T6GYXYhi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si33811791ill.182.2021.11.08.23.15.31; Mon, 08 Nov 2021 23:15:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T6GYXYhi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240673AbhKHXeQ (ORCPT + 99 others); Mon, 8 Nov 2021 18:34:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:46402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbhKHXeP (ORCPT ); Mon, 8 Nov 2021 18:34:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CD11061175; Mon, 8 Nov 2021 23:31:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636414290; bh=P2bBc0/n+Zd/hqg8awc2ShYNTCAACpZXxIz97sKBhjE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=T6GYXYhiDWKtuLAAOkyPgxJPw6wbPWGP6T1bdf3dR5QTDo4bbM75x14HuqzvT5iDx tUo09gjAsJjxcIOcLua7Jjj0Y6jabGVIgeNYcfhegbL93Rx8JOsrrQjvDefoRjME4J gHk50OpiHdiEUzyrmfzC6FZ2M4Nser4+gwNC8YVGvxcSljAvc49fodgqBV78hmtc8t 6iU+I1T0Q0BT1jcRxk4zP1jE8IDV9vK27b0CONkoMJQdpJAZWS7IrCGy8LOCzMWE3b oZpbxfwRn2hc71+siq8x7ViaEG1qx9Wwb8T7d5wMbb1pbMJaHx74U24soEjbp7X9Xg HsS074d77rW6g== Date: Mon, 8 Nov 2021 15:31:26 -0800 From: Jakub Kicinski To: Leon Romanovsky Cc: Ido Schimmel , Jiri Pirko , "David S . Miller" , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, edwin.peer@broadcom.com Subject: Re: [PATCH net-next] devlink: Require devlink lock during device reload Message-ID: <20211108153126.1f3a8fe8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20211101161122.37fbb99d@kicinski-fedora-PC1C0HJN> <20211108080918.2214996c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211108101646.0a4e5ca4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211108104608.378c106e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Nov 2021 21:58:36 +0200 Leon Romanovsky wrote: > > > > nfp will benefit from the simplified locking as well, and so will bnxt, > > > > although I'm not sure the maintainers will opt for using devlink framework > > > > due to the downstream requirements. > > > > > > Exactly why devlink should be fixed first. > > > > If by "fixed first" you mean it needs 5 locks to be added and to remove > > any guarantees on sub-object lifetime then no thanks. > > How do you plan to fix pernet_ops_rwsem lock? By exposing devlink state > to the drivers? By providing unlocked version of unregister_netdevice_notifier? > > This simple scenario has deadlocks: > sudo ip netns add n1 > sudo devlink dev reload pci/0000:00:09.0 netns n1 > sudo ip netns del n1 Okay - I'm not sure why you're asking me this. This is not related to devlink locking as far as I can tell. Neither are you fixing this problem in your own RFC. You'd need to tell me more about what the notifier is used for (I see RoCE in the call trace). I don't understand why you need to re-register a global (i.e. not per netns) notifier when devlink is switching name spaces.