From: Klaus Jensen <its@irrelevant.dk>
To: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Cc: qemu-devel@nongnu.org, kbusch@kernel.org, stefanha@gmail.com
Subject: Re: [PATCH 0/4] hw/nvme: add irqfd support
Date: Wed, 24 Aug 2022 22:15:50 +0200 [thread overview]
Message-ID: <YwaG9sCILU66Q8XB@apples> (raw)
In-Reply-To: <20220811153739.3079672-1-fanjinhao21s@ict.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]
On Aug 11 23:37, Jinhao Fan wrote:
> This patch series changes qemu-nvme's interrupt emulation to use event
> notifiers, which can ensure thread-safe interrupt delivery when iothread
> is used. In the first two patches, I convert qemu-nvme's IO emulation
> logic to send irq via eventfd, so that the actual assertion and
> deassertion is always done in the main loop thread with BQL held. In the
> third patch, support is added to send irq via KVM irqfd, bypassing
> qemu's MSI-x emulation. In the last patch, I add MSI-x mask handlers
> when irqfd is enabled so that qemu-nvme knows which vector is masked
> even when qemu's MSI-x emulation is bypassed.
>
> Jinhao Fan (4):
> hw/nvme: avoid unnecessary call to irq (de)assertion functions
> hw/nvme: add option to (de)assert irq with eventfd
> hw/nvme: use irqfd to send interrupts
> hw/nvme: add MSI-x mask handlers for irqfd
>
> hw/nvme/ctrl.c | 251 +++++++++++++++++++++++++++++++++++++++----
> hw/nvme/nvme.h | 7 ++
> hw/nvme/trace-events | 3 +
> 3 files changed, 243 insertions(+), 18 deletions(-)
>
> --
> 2.25.1
>
Hi Jinhao,
This series all looks pretty good to me. And, incidentally, it is also
super cool work :)
It can use a bit of clean up (the code duplication mentioned previously
by both Stefan and me) - but all the logic seems sound to me and my
testing is happy. Following up on my suggestion to drop the MSI-X
mask/unmasking, I gave the logic a thorough look it looks sound to me.
I'm gonna see what I can come up with for qtest. I suggest you just keep
going on iothread support.
Please post a v2 (all 4 patches) with suggested cleanups and we take it
from there.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-08-24 20:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 15:37 [PATCH 0/4] hw/nvme: add irqfd support Jinhao Fan
2022-08-11 15:37 ` [PATCH 1/4] hw/nvme: avoid unnecessary call to irq (de)assertion functions Jinhao Fan
2022-08-16 15:24 ` Stefan Hajnoczi
2022-08-17 5:42 ` Jinhao Fan
2022-08-11 15:37 ` [PATCH 2/4] hw/nvme: add option to (de)assert irq with eventfd Jinhao Fan
2022-08-16 11:20 ` Klaus Jensen
2022-08-17 5:36 ` Jinhao Fan
2022-08-23 10:58 ` Klaus Jensen
2022-08-11 15:37 ` [PATCH 3/4] hw/nvme: use irqfd to send interrupts Jinhao Fan
2022-08-11 15:37 ` [PATCH 4/4] hw/nvme: add MSI-x mask handlers for irqfd Jinhao Fan
2022-08-16 10:46 ` Klaus Jensen
2022-08-17 5:35 ` Jinhao Fan
2022-08-23 14:43 ` Jinhao Fan
2022-08-24 11:22 ` Klaus Jensen
2022-08-24 13:16 ` Jinhao Fan
2022-08-23 11:04 ` Klaus Jensen
2022-08-16 1:54 ` [PATCH 0/4] hw/nvme: add irqfd support Jinhao Fan
2022-08-24 20:15 ` Klaus Jensen [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=YwaG9sCILU66Q8XB@apples \
--to=its@irrelevant.dk \
--cc=fanjinhao21s@ict.ac.cn \
--cc=kbusch@kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).