> That looks correct since we don't need the ioevent is an optional
> optimization.
>
> I would just suggest making this easier to read. For example, in
> nvme_init_sq_ioeventfd(), instead of assigning within a conditional:
>
> if ((ret = event_notifier_init(&cq->notifier, 0))) {
>
> Do each part separately:
>
> ret = event_notifier_init(&cq->notifier, 0);
> if (ret) {
Thanks for the comment! Will change in the next version.
>
>> I’ve also been wondering whether using irqfd for sending interrupts can
>> bring some benefits. I’m not familiar with how QEMU emulates interrupts.
>> What do you think of irqfd’s?
>
> Not sure about this mechanism, I'll need to look into it.
Since irqfd is internally a counter, I guess it may be able to “coalesce”
interrupts so that performance can be improved. I will try it tomorrow.