Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "David Matlack" <dmatlack@google.com>
To: "Bjorn Helgaas" <helgaas@kernel.org>,
	"Michal Clapinski" <mclapinski@google.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
	<linux-pci@vger.kernel.org>, "Lukas Wunner" <lukas@wunner.de>,
	<linux-kernel@vger.kernel.org>,
	"David Matlack" <dmatlack@google.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Jonathan Cameron" <jonathan.cameron@oss.qualcomm.com>,
	"Gregory Price" <gourry@gourry.net>,
	"Alexey Kardashevskiy" <aik@amd.com>,
	"Thomas Gleixner" <tglx@kernel.org>
Subject: Re: [PATCH v2 0/2] PCI/DOE: Speed up mailbox polling
Date: Fri, 04 Dec 2026 15:42:47 -0800	[thread overview]
Message-ID: <DNCCHV7OAU7T.2K5XVKDV74MFN@google.com> (raw)
In-Reply-To: <20261103212714.GA1139635@bhelgaas>

On Tue Nov 3, 2026 at 1:27 PM PST, Bjorn Helgaas wrote:
> I wish we had a way to use interrupts instead of polling, but it
> doesn't seem like we have a way to share MSI/MSI-X vectors between
> PCI core code like this and the eventual driver.  Added Thomas in case
> he has any brilliant ideas about that.

I thought about this a bit, and I don't know if interrupts would buy
much for the enumeration case:

 - The DOE interrupt is signaled for Data Object Ready and DOE Error,
   but not when DOE Busy clears (PCIe r6.2, sec 6.30.3, per
   pci_doe_send_req()). So pci_doe_abort() would still have to poll.

 - During enumeration there's no driver yet, so the PCI core would have
   to allocate and enable MSI/MSI-X vectors itself just for the DOE
   exchanges, and then tear them down before the driver probes. That
   setup and teardown may cost about as much as the ~110 us discovery
   exchanges it would replace (pure speculation on my part).

 - Polling with a short busy-poll before sleeping already notices a
   response within a few microseconds of it being ready, which is about
   the same as the latency of taking an interrupt and waking up the
   waiting task.

Interrupts would help with exchanges that take much longer, where
polling burns more CPU. But I think that's a separate problem from this
series.

      reply	other threads:[~2026-12-04 23:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 16:30 [PATCH v2 0/2] PCI/DOE: Speed up mailbox polling Michal Clapinski
2026-11-03 16:31 ` [PATCH v2 1/2] PCI/DOE: Don't busy-poll the mailbox when HZ < 128 Michal Clapinski
2026-11-03 16:33   ` sashiko-bot
2026-11-03 16:31 ` [PATCH v2 2/2] PCI/DOE: Poll briefly for a response before sleeping Michal Clapinski
2026-11-03 16:35   ` sashiko-bot
2026-12-04 23:52   ` David Matlack
2026-11-03 21:27 ` [PATCH v2 0/2] PCI/DOE: Speed up mailbox polling Bjorn Helgaas
2026-12-04 23:42   ` David Matlack [this message]

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=DNCCHV7OAU7T.2K5XVKDV74MFN@google.com \
    --to=dmatlack@google.com \
    --cc=aik@amd.com \
    --cc=alistair@alistair23.me \
    --cc=bhelgaas@google.com \
    --cc=gourry@gourry.net \
    --cc=helgaas@kernel.org \
    --cc=jonathan.cameron@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mclapinski@google.com \
    --cc=tglx@kernel.org \
    /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