From: Klaus Jensen <its@irrelevant.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
linux-nvme@lists.infradead.org, qemu-block@nongnu.org,
qemu-devel@nongnu.org, Guenter Roeck <linux@roeck-us.net>
Subject: Re: completion timeouts with pin-based interrupts in QEMU hw/nvme
Date: Thu, 12 Jan 2023 18:45:55 +0100 [thread overview]
Message-ID: <Y8BHUzcbdQ/SFBY9@cormorant.local> (raw)
In-Reply-To: <Y8A2qdbDZPicuZfL@kbusch-mbp.dhcp.thefacebook.com>
[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]
On Jan 12 09:34, Keith Busch wrote:
> On Thu, Jan 12, 2023 at 02:10:51PM +0100, Klaus Jensen wrote:
> >
> > The pin-based interrupt logic in hw/nvme seems sound enough to me, so I
> > am wondering if there is something going on with the kernel driver (but
> > I certainly do not rule out that hw/nvme is at fault here, since
> > pin-based interrupts has also been a source of several issues in the
> > past).
>
> Does it work if you change the pci_irq_assert() back to pci_irq_pulse()?
> While probably not the "correct" thing to do, it has better results in
> my testing.
>
A simple s/pci_irq_assert/pci_irq_pulse broke the device. However,
diff --git i/hw/nvme/ctrl.c w/hw/nvme/ctrl.c
index 03760ddeae8c..0fc46dcb9ec4 100644
--- i/hw/nvme/ctrl.c
+++ w/hw/nvme/ctrl.c
@@ -477,6 +477,7 @@ static void nvme_irq_check(NvmeCtrl *n)
return;
}
if (~intms & n->irq_status) {
+ pci_irq_deassert(&n->parent_obj);
pci_irq_assert(&n->parent_obj);
} else {
pci_irq_deassert(&n->parent_obj);
seems to do the trick (pulse is the other way around, assert, then
deassert).
Probably not the "correct" thing to do, but I'll take it since it seems
to fix it. On a simple boot loop I got the timeout about 1 out of 5. I'm
on ~20 runs now and have not encountered it.
I'll see if I can set up a mips rootfs and test that. Guenter, what MIPS
machine/board(s) are you testing?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-01-12 17:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 13:10 completion timeouts with pin-based interrupts in QEMU hw/nvme Klaus Jensen
2023-01-12 14:26 ` Guenter Roeck
2023-01-12 16:34 ` Keith Busch
2023-01-12 17:45 ` Klaus Jensen [this message]
2023-01-12 17:51 ` Keith Busch
2023-01-12 19:14 ` Guenter Roeck
2023-01-12 19:27 ` Keith Busch
2023-01-13 0:27 ` Guenter Roeck
2023-01-12 23:57 ` Guenter Roeck
2023-01-13 8:54 ` Klaus Jensen
2023-01-13 12:32 ` Peter Maydell
2023-01-13 12:37 ` Klaus Jensen
2023-01-13 12:42 ` Peter Maydell
2023-01-13 12:46 ` Klaus Jensen
2023-01-13 16:52 ` Keith Busch
2023-01-16 21:14 ` Klaus Jensen
2023-01-17 4:58 ` Keith Busch
2023-01-17 16:09 ` Guenter Roeck
2023-01-17 16:18 ` Peter Maydell
2023-01-17 19:21 ` Guenter Roeck
2023-01-18 15:04 ` Peter Maydell
2023-01-18 16:33 ` Keith Busch
2023-01-18 23:06 ` Keith Busch
2023-01-19 0:41 ` Alistair Francis
2023-01-19 2:44 ` Keith Busch
2023-01-19 3:10 ` Alistair Francis
2023-01-19 4:03 ` Keith Busch
2023-01-19 7:28 ` Klaus Jensen
2023-01-19 8:02 ` Klaus Jensen
2023-01-19 14:32 ` Guenter Roeck
2023-01-19 10:35 ` Peter Maydell
2023-01-17 16:05 ` Guenter Roeck
2023-01-18 4:17 ` Keith Busch
2023-01-18 22:26 ` Keith Busch
2023-01-19 7:06 ` Klaus Jensen
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=Y8BHUzcbdQ/SFBY9@cormorant.local \
--to=its@irrelevant.dk \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sagi@grimberg.me \
/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