[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180613221509.GB12463@bjorn-Precision-5520>
Date: Wed, 13 Jun 2018 17:15:09 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Dexuan Cui <decui@...rosoft.com>
Cc: 'Bjorn Helgaas' <bhelgaas@...gle.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
'Lorenzo Pieralisi' <lorenzo.pieralisi@....com>,
"'linux-pci@...r.kernel.org'" <linux-pci@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"'olaf@...fle.de'" <olaf@...fle.de>,
"'apw@...onical.com'" <apw@...onical.com>,
"'jasowang@...hat.com'" <jasowang@...hat.com>,
"'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
"'driverdev-devel@...uxdriverproject.org'"
<driverdev-devel@...uxdriverproject.org>,
"'vkuznets@...hat.com'" <vkuznets@...hat.com>,
"'marcelo.cerri@...onical.com'" <marcelo.cerri@...onical.com>
Subject: Re: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in
hv_compose_msi_msg()
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 <haiyangz@...rosoft.com>; Lorenzo Pieralisi
> > <lorenzo.pieralisi@....com>; Bjorn Helgaas <bhelgaas@...gle.com>;
> > linux-pci@...r.kernel.org; KY Srinivasan <kys@...rosoft.com>; Stephen
> > Hemminger <sthemmin@...rosoft.com>; olaf@...fle.de;
> > apw@...onical.com; jasowang@...hat.com
> > Cc: linux-kernel@...r.kernel.org; driverdev-devel@...uxdriverproject.org;
> > vkuznets@...hat.com; marcelo.cerri@...onical.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 <decui@...rosoft.com>; Lorenzo Pieralisi
> > > <lorenzo.pieralisi@....com>; Bjorn Helgaas <bhelgaas@...gle.com>;
> > > linux-pci@...r.kernel.org; KY Srinivasan <kys@...rosoft.com>; Stephen
> > > Hemminger <sthemmin@...rosoft.com>; olaf@...fle.de;
> > > apw@...onical.com; jasowang@...hat.com
> > > Cc: linux-kernel@...r.kernel.org; driverdev-devel@...uxdriverproject.org;
> > > vkuznets@...hat.com; marcelo.cerri@...onical.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 <lorenzo.pieralisi@....com>; Bjorn Helgaas
> > > > <bhelgaas@...gle.com>; linux-pci@...r.kernel.org; KY Srinivasan
> > > > <kys@...rosoft.com>; Stephen Hemminger <sthemmin@...rosoft.com>;
> > > > olaf@...fle.de; apw@...onical.com; jasowang@...hat.com
> > > > Cc: linux-kernel@...r.kernel.org; driverdev-devel@...uxdriverproject.org;
> > > > Haiyang Zhang <haiyangz@...rosoft.com>; vkuznets@...hat.com;
> > > > marcelo.cerri@...onical.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 <decui@...rosoft.com>
> > > > Cc: <stable@...r.kernel.org>
> > > > Cc: Stephen Hemminger <sthemmin@...rosoft.com>
> > > > Cc: K. Y. Srinivasan <kys@...rosoft.com>
> > > > ---
> > >
> > > Reviewed-by: Haiyang Zhang <haiyangz@...rosoft.com>
> > >
> > > 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
Powered by blists - more mailing lists