|
From: | Jinhao Fan |
Subject: | Re: [PATCH v3 4/4] hw/nvme: add polling support |
Date: | Thu, 3 Nov 2022 21:19:53 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |