Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1199402imm; Wed, 13 Jun 2018 15:16:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJbJXk/V+tKy+FQa8hSf4zpJXqiCrZEkrqsCs6BqVscVvcVesnONiBsM0iz2KnuWkI9qabW X-Received: by 2002:a65:630b:: with SMTP id g11-v6mr5505522pgv.303.1528928170570; Wed, 13 Jun 2018 15:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528928170; cv=none; d=google.com; s=arc-20160816; b=K+G3wH/rkevre1QDSJaefxozbzVfB5u5/rL5JDwDYzrwwc4AGGW9KnUBPjsWxdizMR 6KDfwHJ+gb0TLXMbsUxmFn9Jfbfho7jZ84MJHTkbE57hFEPDsXwRL9cg6AZnMYaqJU85 Mkui1xxSaGUKvTd3wTUrNBOWQ5/Q9dRvv0sobNUx3f/7jqG789kn7MyNqe5kJtHXMJ17 DeDLUv0gh7sZ7aiRiO713gfLI8bCyICue+srirR8Wt1+qqbn4ChaR67L06pmA4Ba69KJ VUHPehxm2oigBDdU0/d+X5hGSl4xZYEL742dPnH9l5bJQYoUB/Vk+EN+f5VVJOEzvq7W Rt2w== 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:arc-authentication-results; bh=t1KUf3aqewI0Dfmp50P/hqYvMFCkXyWM9XbZqkNAIlY=; b=EeYF9lIPHDvaOtud6LmWztBT9kJz1HKeprBhxA3cHL2Q9JyW5c52VOkTqFjxo6jErp 1L+IQ1q4S/++GhGZte/EzGs95PPjD5LKCUvOilLD/amoklcGUxStsKEDnxRGgnEEbBhJ IQ58GYunRBI2+1rz/jvs6xuPI6eWuI1GKvG5m3o/oKUnq+Qwp8V5ebRl5XYsa8irTplv AWhkskMcvBwsdElevGAnJAN0QhWSDzwAi5xjsThH1sDX22vByhWpAjzHgiBHiOppO10i iK69GB1N3LtgWn+Il+ZnTWB2Lh9ZR4KAaal6BWK3aq4atfx/kPFGm29vxd7qMNAYtQg/ cD8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wwtHtY58; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4-v6si3910615plb.313.2018.06.13.15.15.56; Wed, 13 Jun 2018 15:16:10 -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=@kernel.org header.s=default header.b=wwtHtY58; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935875AbeFMWPN (ORCPT + 99 others); Wed, 13 Jun 2018 18:15:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:41130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754526AbeFMWPL (ORCPT ); Wed, 13 Jun 2018 18:15:11 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE11A208D5; Wed, 13 Jun 2018 22:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528928111; bh=MGKZR6bc4PYJNvCdq0qTwyx/CAUHxa6YahH3nbkdnV8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wwtHtY58jHQ9Hr//hJ8ukelE5ESWoSkbhi9/Wqod8g9MskhvKBiJyAc2csuROdxE1 0/FUup2veYgzOlSbZPpJaudlnJUQmEXwQ6CsH8125xXqgxXda47IMqpP6eWhvnmip4 NtJgxMXDLw2RB0irKS4ESr0lAj2V8WB6IDtKzZow= Date: Wed, 13 Jun 2018 17:15:09 -0500 From: Bjorn Helgaas To: Dexuan Cui Cc: 'Bjorn Helgaas' , Haiyang Zhang , 'Lorenzo Pieralisi' , "'linux-pci@vger.kernel.org'" , KY Srinivasan , Stephen Hemminger , "'olaf@aepfle.de'" , "'apw@canonical.com'" , "'jasowang@redhat.com'" , "'linux-kernel@vger.kernel.org'" , "'driverdev-devel@linuxdriverproject.org'" , "'vkuznets@redhat.com'" , "'marcelo.cerri@canonical.com'" Subject: Re: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg() Message-ID: <20180613221509.GB12463@bjorn-Precision-5520> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 13, 2018 at 08:32:13PM +0000, Dexuan Cui wrote: > > From: Dexuan Cui > > Sent: Wednesday, June 6, 2018 17:15 > > To: Haiyang Zhang ; Lorenzo Pieralisi > > ; Bjorn Helgaas ; > > linux-pci@vger.kernel.org; KY Srinivasan ; Stephen > > Hemminger ; olaf@aepfle.de; > > apw@canonical.com; jasowang@redhat.com > > Cc: linux-kernel@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > > vkuznets@redhat.com; marcelo.cerri@canonical.com > > Subject: RE: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in > > hv_compose_msi_msg() > > > > > From: Haiyang Zhang > > > Sent: Friday, May 25, 2018 12:52 > > > To: Dexuan Cui ; Lorenzo Pieralisi > > > ; Bjorn Helgaas ; > > > linux-pci@vger.kernel.org; KY Srinivasan ; Stephen > > > Hemminger ; olaf@aepfle.de; > > > apw@canonical.com; jasowang@redhat.com > > > Cc: linux-kernel@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > > > vkuznets@redhat.com; marcelo.cerri@canonical.com > > > Subject: RE: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in > > > hv_compose_msi_msg() > > > > > > > From: Dexuan Cui > > > > Sent: Tuesday, May 22, 2018 8:18 PM > > > > To: Lorenzo Pieralisi ; Bjorn Helgaas > > > > ; linux-pci@vger.kernel.org; KY Srinivasan > > > > ; Stephen Hemminger ; > > > > olaf@aepfle.de; apw@canonical.com; jasowang@redhat.com > > > > Cc: linux-kernel@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > > > > Haiyang Zhang ; vkuznets@redhat.com; > > > > marcelo.cerri@canonical.com > > > > Subject: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in > > > > hv_compose_msi_msg() > > > > > > > > > > > > Commit de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in > > > hv_compose_msi_msg()") > > > > uses local_bh_disable()/enable(), because hv_pci_onchannelcallback() can > > > also > > > > run in tasklet context as the channel event callback. > > > > > > > > With CONFIG_PROVE_LOCKING=y in the latest mainline, or old kernels that > > > > don't have commit f71b74bca637 ("irq/softirqs: Use lockdep to assert IRQs > > > are > > > > disabled/enabled"), it turns out can we trigger a warning at the beginning > > of > > > > __local_bh_enable_ip(), because the upper layer irq code can call > > > > hv_compose_msi_msg() with local irqs disabled. > > > > > > > > Let's fix the warning by switching to local_irq_save()/restore(). This is not an > > > > issue because hv_pci_onchannelcallback() is not slow, and it not a hot path. > > > > > > > > Fixes: de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in > > hv_compose_msi_msg()") > > > > Signed-off-by: Dexuan Cui > > > > Cc: > > > > Cc: Stephen Hemminger > > > > Cc: K. Y. Srinivasan > > > > --- > > > > > > Reviewed-by: Haiyang Zhang > > > > > > Thanks you. > > > > Hi Lorenzo, > > > > Can I have your reply to this patch? > > > > -- Dexuan > > It looks Lorenzo's pci.git tree has not been updated for 3+ weeks. > I guess Lorenzo may be on vacation. > > @Bjorn, can this patch go through your tree? > Should I resubmit it? No need to resubmit it, Lorenzo has been out for a bit, but I'm sure he'll pick this up as he catches up. You might, however, fix the commit log: This is not an issue because hv_pci_onchannelcallback() is not slow, and it not a hot path. This has at least one typo (I think you mean "and *is* not a hot path"). I also don't understand the sentence as a whole because the hv_pci_onchannelcallback() comment says it's called whenever the host sends a packet to this channel, and that *does* sound like a hot path. I also don't understand the "hv_pci_onchannelcallback() is not slow" part. In other words, you're saying hv_pci_onchannelcallback() is fast and it's not a hot path. And apparently this has something to do with the difference between local_bh_disable() and local_irq_save()? Bjorn