LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Dexuan Cui <decui@microsoft.com>
Cc: 'Bjorn Helgaas' <bhelgaas@google.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
'Lorenzo Pieralisi' <lorenzo.pieralisi@arm.com>,
"'linux-pci@vger.kernel.org'" <linux-pci@vger.kernel.org>,
KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"'olaf@aepfle.de'" <olaf@aepfle.de>,
"'apw@canonical.com'" <apw@canonical.com>,
"'jasowang@redhat.com'" <jasowang@redhat.com>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
"'driverdev-devel@linuxdriverproject.org'"
<driverdev-devel@linuxdriverproject.org>,
"'vkuznets@redhat.com'" <vkuznets@redhat.com>,
"'marcelo.cerri@canonical.com'" <marcelo.cerri@canonical.com>
Subject: Re: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()
Date: Wed, 13 Jun 2018 17:15:09 -0500 [thread overview]
Message-ID: <20180613221509.GB12463@bjorn-Precision-5520> (raw)
In-Reply-To: <KL1P15301MB00069C79B0C674695DDBC8AABF7E0@KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM>
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@microsoft.com>; Lorenzo Pieralisi
> > <lorenzo.pieralisi@arm.com>; Bjorn Helgaas <bhelgaas@google.com>;
> > linux-pci@vger.kernel.org; KY Srinivasan <kys@microsoft.com>; Stephen
> > Hemminger <sthemmin@microsoft.com>; 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 <decui@microsoft.com>; Lorenzo Pieralisi
> > > <lorenzo.pieralisi@arm.com>; Bjorn Helgaas <bhelgaas@google.com>;
> > > linux-pci@vger.kernel.org; KY Srinivasan <kys@microsoft.com>; Stephen
> > > Hemminger <sthemmin@microsoft.com>; 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 <lorenzo.pieralisi@arm.com>; Bjorn Helgaas
> > > > <bhelgaas@google.com>; linux-pci@vger.kernel.org; KY Srinivasan
> > > > <kys@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>;
> > > > olaf@aepfle.de; apw@canonical.com; jasowang@redhat.com
> > > > Cc: linux-kernel@vger.kernel.org; driverdev-devel@linuxdriverproject.org;
> > > > Haiyang Zhang <haiyangz@microsoft.com>; 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 <decui@microsoft.com>
> > > > Cc: <stable@vger.kernel.org>
> > > > Cc: Stephen Hemminger <sthemmin@microsoft.com>
> > > > Cc: K. Y. Srinivasan <kys@microsoft.com>
> > > > ---
> > >
> > > Reviewed-by: Haiyang Zhang <haiyangz@microsoft.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
next prev parent reply other threads:[~2018-06-13 22:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-23 0:18 Dexuan Cui
2018-05-25 19:51 ` Haiyang Zhang
2018-06-07 0:14 ` Dexuan Cui
2018-06-13 20:32 ` Dexuan Cui
2018-06-13 22:15 ` Bjorn Helgaas [this message]
2018-06-13 22:50 ` Dexuan Cui
2018-06-29 9:39 ` Lorenzo Pieralisi
2018-06-30 18:13 ` Dexuan Cui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180613221509.GB12463@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=apw@canonical.com \
--cc=bhelgaas@google.com \
--cc=decui@microsoft.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=marcelo.cerri@canonical.com \
--cc=olaf@aepfle.de \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.com \
--subject='Re: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).