From: Jinhao Fan <fanjinhao21s@ict.ac.cn>
To: Klaus Jensen <its@irrelevant.dk>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Keith Busch <kbusch@kernel.org>,
Stefan Hajnoczi <stefanha@gmail.com>,
"open list:nvme" <qemu-block@nongnu.org>
Subject: Re: [PATCH v3 4/4] hw/nvme: add polling support
Date: Thu, 3 Nov 2022 21:19:53 +0800 [thread overview]
Message-ID: <3ffebed8-997d-e276-bf4a-c75508b0be11@ict.ac.cn> (raw)
In-Reply-To: <Y2OvzcfeawKWvvJ0@cormorant.local>
On 11/3/2022 8:10 PM, Klaus Jensen wrote:
> I agree that the spec is a little unclear on this point. In any case, in
> Linux, when the driver has decided that the sq tail must be updated,
> it will use this check:
>
> (new_idx - event_idx - 1) < (new_idx - old)
When eventidx is already behind, it's like:
0
1 <- event_idx
2 <- old
3 <- new_idx
4
.
.
.
In this case, (new_idx - event_idx - 1) = 3-1-1 = 1 >= (new_idx - old) =
3-2=1, so the host won't update sq tail. Where am I wrong in this example?
>
> So it doesn't account for if or not eventidx was already behind.
next prev parent reply other threads:[~2022-11-03 13:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-27 9:12 [PATCH v3 0/4] irqfd, iothread and polling support Jinhao Fan
2022-08-27 9:12 ` [PATCH v3 1/4] hw/nvme: support irq(de)assertion with eventfd Jinhao Fan
2022-08-27 9:12 ` [PATCH v3 2/4] hw/nvme: use KVM irqfd when available Jinhao Fan
2022-08-27 9:12 ` [PATCH v3 3/4] hw/nvme: add iothread support Jinhao Fan
2022-10-20 11:13 ` Klaus Jensen
2022-11-03 1:51 ` Jinhao Fan
2022-11-03 12:11 ` Klaus Jensen
2022-11-03 13:10 ` Jinhao Fan
2022-08-27 9:12 ` [PATCH v3 4/4] hw/nvme: add polling support Jinhao Fan
2022-10-20 11:10 ` Klaus Jensen
2022-11-03 2:18 ` Jinhao Fan
2022-11-03 12:10 ` Klaus Jensen
2022-11-03 13:19 ` Jinhao Fan [this message]
2022-11-04 6:32 ` Klaus Jensen
2022-11-08 12:39 ` John Levon
2022-11-08 14:11 ` Klaus Jensen
2022-11-09 4:35 ` Jinhao Fan
2022-10-20 11:16 ` [PATCH v3 0/4] irqfd, iothread and " 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=3ffebed8-997d-e276-bf4a-c75508b0be11@ict.ac.cn \
--to=fanjinhao21s@ict.ac.cn \
--cc=its@irrelevant.dk \
--cc=kbusch@kernel.org \
--cc=qemu-block@nongnu.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 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.