All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Cc: qemu-devel@nongnu.org, kbusch@kernel.org
Subject: Re: [PATCH v4] hw/nvme: Use ioeventfd to handle doorbell updates
Date: Mon, 25 Jul 2022 22:55:53 +0200	[thread overview]
Message-ID: <Yt8DWWg8qPLxL0fk@apples> (raw)
In-Reply-To: <20220705142403.101539-1-fanjinhao21s@ict.ac.cn>

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

On Jul  5 22:24, Jinhao Fan wrote:
> Add property "ioeventfd" which is enabled by default. When this is
> enabled, updates on the doorbell registers will cause KVM to signal
> an event to the QEMU main loop to handle the doorbell updates.
> Therefore, instead of letting the vcpu thread run both guest VM and
> IO emulation, we now use the main loop thread to do IO emulation and
> thus the vcpu thread has more cycles for the guest VM.
> 
> Since ioeventfd does not tell us the exact value that is written, it is
> only useful when shadow doorbell buffer is enabled, where we check
> for the value in the shadow doorbell buffer when we get the doorbell
> update event.
> 
> IOPS comparison on Linux 5.19-rc2: (Unit: KIOPS)
> 
> qd           1   4  16  64
> qemu        35 121 176 153
> ioeventfd   41 133 258 313
> 
> Changes since v3:
>  - Do not deregister ioeventfd when it was not enabled on a SQ/CQ
> 
> Signed-off-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
> ---
>  hw/nvme/ctrl.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++-
>  hw/nvme/nvme.h |   5 +++
>  2 files changed, 118 insertions(+), 1 deletion(-)
> 

We have a regression following this patch that we need to address.

With this patch, issuing a reset on the device (`nvme reset /dev/nvme0`
will do the trick) causes QEMU to hog my host cpu at 100%.

I'm still not sure what causes this. The trace output is a bit
inconclusive still.

I'll keep looking into it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2022-07-25 20:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 14:24 [PATCH v4] hw/nvme: Use ioeventfd to handle doorbell updates Jinhao Fan
2022-07-05 17:11 ` Klaus Jensen
2022-07-05 18:43   ` Keith Busch
2022-07-06 11:34     ` Jinhao Fan
2022-07-07  5:51       ` Klaus Jensen
2022-07-07  8:50         ` Jinhao Fan
2022-07-06 10:57   ` Jinhao Fan
2022-07-09  3:06 ` Jinhao Fan
2022-07-12 12:23   ` Klaus Jensen
2022-07-14  5:35     ` Klaus Jensen
2022-07-25 20:55 ` Klaus Jensen [this message]
2022-07-26  7:35   ` Jinhao Fan
2022-07-26  7:41     ` Klaus Jensen
2022-07-26  7:55       ` Jinhao Fan
2022-07-26  9:19         ` Klaus Jensen
2022-07-26 10:09           ` Klaus Jensen
2022-07-26 11:24             ` Klaus Jensen
2022-07-26 11:32               ` Klaus Jensen
2022-07-26 12:08                 ` Klaus Jensen
2022-07-27  7:06                   ` Klaus Jensen
2022-07-27  8:16                     ` Jinhao Fan
2022-07-27  8:21                       ` Klaus Jensen
2022-07-27 15:09                         ` Jinhao Fan
2022-07-26 12:35 ` Stefan Hajnoczi

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=Yt8DWWg8qPLxL0fk@apples \
    --to=its@irrelevant.dk \
    --cc=fanjinhao21s@ict.ac.cn \
    --cc=kbusch@kernel.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.