From: Bjorn Helgaas <helgaas@kernel.org>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: "Marciniszyn, Mike" <mike.marciniszyn@intel.com>,
"Dalessandro, Dennis" <dennis.dalessandro@intel.com>,
Doug Ledford <dledford@redhat.com>,
"Hefty, Sean" <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: hfi1 use of PCI internals
Date: Thu, 16 Jun 2016 15:08:17 -0500 [thread overview]
Message-ID: <20160616200817.GA17778@localhost> (raw)
In-Reply-To: <tnm1toa71hsw1.fsf@phwtpriv05.ph.intel.com>
On Thu, Jun 16, 2016 at 02:48:30PM -0400, Ashutosh Dixit wrote:
> On Thu, Jun 16 2016 at 12:20:52 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> > I noticed drivers/infiniband/hw/hfi1 got moved from staging to
> > drivers/ for v4.7. It does a bunch of grubbing around in PCIe ASPM
> > configuration, e.g., see drivers/infiniband/hw/hfi1/aspm.h.
> >
> > I know there have been lots of ASPM issues, both hardware problems and
> > Linux kernel problems, but it is *supposed* to be manageable by the
> > core, without special driver support. What's the justification for
> > having to do this in the hfi1 driver?
>
> The description for commit affa48de84 "staging/rdma/hfi1: Add support
> for enabling/disabling PCIe ASPM" anticipates this question and
> describes why this was done in the hfi1 driver:
>
> Finally, the kernel ASPM API is not used in this patch. This is
> because this patch does several non-standard things as SW
> workarounds for HW issues. As mentioned above, it enables ASPM even
> when advertised actual latencies are greater than acceptable
> latencies. Also, whereas the kernel API only allows drivers to
> disable ASPM from driver probe, this patch enables/disables ASPM
> directly from interrupt context. Due to these reasons the kernel
> ASPM API was not used.
That's a good start, but leads to more questions. For example, it
doesn't answer the obvious question of why the driver needs to
enable/disable ASPM from interrupt context.
Disabling ASPM should only require writing the device's Link Control
register. The PCI core could probably provide an interface to do that
in interrupt context.
Enabling ASPM is not latency-critical and could probably be done from
a work queue outside interrupt context, although conceptually there
shouldn't be much required here either, and possibly the PCI core
interface could be improved.
It's possible the latency problem could be handled by some sort of
quirk that overrides the acceptable latency.
It's hard enough to get ASPM support in the PCI core correct without
having to worry about drivers doing their own thing behind the back of
the core.
As far as I can tell, none of these PCI questions were raised on
linux-pci, so we never even had a chance to have a conversation about
them.
Bjorn
next prev parent reply other threads:[~2016-06-16 20:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 16:20 hfi1 use of PCI internals Bjorn Helgaas
2016-06-16 18:48 ` Ashutosh Dixit
2016-06-16 20:08 ` Bjorn Helgaas [this message]
2016-06-17 13:58 ` Dennis Dalessandro
2016-06-17 22:05 ` Ashutosh Dixit
2016-06-17 23:04 ` Bjorn Helgaas
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=20160616200817.GA17778@localhost \
--to=helgaas@kernel.org \
--cc=ashutosh.dixit@intel.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
--cc=sean.hefty@intel.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).