Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp216356yba; Thu, 25 Apr 2019 21:45:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqz18oXsYymsRcNWe61cREZ1NZttbvNeom1OFSsgZWQdFfe+T1j2SXOcrQW21+P/vC9AZoQk X-Received: by 2002:a17:902:9a4a:: with SMTP id x10mr2469899plv.113.1556253903240; Thu, 25 Apr 2019 21:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556253903; cv=none; d=google.com; s=arc-20160816; b=cLSn/dGf5g6LlDsZn6hjQsq0UWccX+Q7QtdMAtIm0cdPzBDONbbpG+9lGUJ8/U+A05 1oV9EAAM64swid5FrM1p81MtN9nxeP1EB+NQhkmn/5ejPCG9dWFn5p5Kuwq+SPJsQgdL QKl+Atl4dOsqrsUHpvuMo8gb3xi1MOKK9GoiSz/2h2l/PGg7BRcxrHGTzHJq8AAt381W 3fYqU+6pFFGDGtmZSPQw7EvfJKTZ5XqAUI/FI8B+pVFZ32IO9WPQD7doFLutPS2QuAGA I5uV7CTS8TsHZw0VAVvK8dLilMzKS4or65bLvKC4yAqn6zMdXJmG3pNS0b5DZ0NC+imM k+zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XSLRr44YLkdq2LsCyuTPnlTs2ingRxoTOaZ2gfvZiG0=; b=TdFpUGrjbK6Q0r74kvtm3OO+cct9hO074+QAYL4hTQ3y12qUZwi21OlMHbfVZGfEfm gYKjw7dHlOXL+xm5TjBpTDvoayMQMxN+KmyerTvu8ONN2d6AWl4UEZFavuagi5tOsTTp 2V6NYaywkc0+Ybmp/UWNK8KuD8PPt7CIH/zqBwuThtoqfad5LRZ2uC1yaU0TCplks9Xt bJqqdtkEySQqBiPcw9rJp/8clbNhv2P99qMOGnd6MT2Tw0dLOKTMiqaWvJI9u1EpsenP 8ps1Of7MHKCeq1kAxyV2WAJxEUdCgH2Chw0Pi0sYv4+/cdKee1dzoEtyB/AAWUDpbwDu qq6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=R4PQQSOH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r80si25118583pfa.128.2019.04.25.21.44.48; Thu, 25 Apr 2019 21:45:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=R4PQQSOH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726403AbfDZEiO (ORCPT + 99 others); Fri, 26 Apr 2019 00:38:14 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42411 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfDZEiN (ORCPT ); Fri, 26 Apr 2019 00:38:13 -0400 Received: by mail-wr1-f67.google.com with SMTP id g3so2424521wrx.9 for ; Thu, 25 Apr 2019 21:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XSLRr44YLkdq2LsCyuTPnlTs2ingRxoTOaZ2gfvZiG0=; b=R4PQQSOHwETZ7GCEsmh+7LRaoO5KkGLckgv61Np9Za6guwvbQGbLWrOzN75zCEBglT 2l/XV7vApy5sm/Imh4WAvoqkFV6Fun4M7xvipTI7oUNSLgUrbrvz/dSDZIB1oQwnzvMp LRlX3GgnAgN+KWAfIOccDMNKJWsdkyyWRcZMkipQZqjsQDpnGZPBhcMa/fulJdwMDTL/ wM7IWgyxa/GiE+xPQw2b5tK3d7jBDLHb0xMVE1VuDsbhWIiF9uACxGIMZnp605gwQzH2 Z0Q9nW4cwTHYIWZmTfbQBOSbMO0I4hjFcRrRupAIvPyik4kAE8LIWVnCQtX8Q9wn0LSr xEzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XSLRr44YLkdq2LsCyuTPnlTs2ingRxoTOaZ2gfvZiG0=; b=IlsMKtgZd0b/dVcmlSzI0yRfAByFCyuDQdfroPhyQslT+Mnuh+swgBKD2Oj/uzo62J jRbryutCqrn9fAVmNywTOcVVSEAGkTrANl8Z6ZbaqHkSV6qFhuG7dQ0EOqZcBlsTafRM D+NVtBBNCzqjNhYW/hX55aU33Ai+K8zx9QHHkTSG8tmfRMLjSPgIn1aigiaUluRKkQQ3 mRJF5oUrkFAIKUAL0ddX5783NI8/OiazWIIZXFLwBrMqqYPU37f73HJeF7yT1uAw95G6 U2b5x2GHO7Akdm8S5YmBpSk++xrNrr4xo/zEmOVqlUi5Aj8+dHFjSCGllV0HrpRCOMRl gFrQ== X-Gm-Message-State: APjAAAXchFFGJslnvuc0b2367mP+gHOnbShh+GbRdE/cX438pNq7pb5f kh/7T4gyaTEftgYOPqoVq49SGA== X-Received: by 2002:adf:eb0c:: with SMTP id s12mr26911797wrn.229.1556253491394; Thu, 25 Apr 2019 21:38:11 -0700 (PDT) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id o1sm33295827wmh.47.2019.04.25.21.38.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 21:38:10 -0700 (PDT) Date: Fri, 26 Apr 2019 06:38:09 +0200 From: Jiri Pirko To: Jakub Kicinski Cc: Moshe Shemesh , "David S. Miller" , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] devlink: Execute devlink health recover as a work Message-ID: <20190426043809.GC2271@nanopsycho.orion> References: <1556189823-5368-1-git-send-email-moshe@mellanox.com> <20190425143847.417033ab@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190425143847.417033ab@cakuba.netronome.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thu, Apr 25, 2019 at 11:38:47PM CEST, jakub.kicinski@netronome.com wrote: >On Thu, 25 Apr 2019 13:57:03 +0300, Moshe Shemesh wrote: >> Different reporters have different rules in the driver and are being >> created/destroyed during different stages of driver load/unload/running. >> So during execution of a reporter recover the flow can go through >> another reporter's destroy and create. Such flow leads to deadlock >> trying to lock a mutex already held if the flow was triggered by devlink >> recover command. >> To avoid such deadlock, we execute the recover flow from a workqueue. >> Once the recover work is done successfully the reporter health state and >> recover counter are being updated. > >Naive question, why not just run the doit unlocked? Why the async? Hmm, you have a point here. That would be probably doable.