[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/nvme: Use ioeventfd to handle doorbell updates
From: |
Jinhao Fan |
Subject: |
Re: [PATCH] hw/nvme: Use ioeventfd to handle doorbell updates |
Date: |
Wed, 29 Jun 2022 17:04:25 +0800 |
Ping~
> @@ -4271,6 +4343,11 @@ static void nvme_init_sq(NvmeSQueue *sq, NvmeCtrl *n,
> uint64_t dma_addr,
> if (n->dbbuf_enabled) {
> sq->db_addr = n->dbbuf_dbs + (sqid << 3);
> sq->ei_addr = n->dbbuf_eis + (sqid << 3);
> +
> + if (n->params.ioeventfd && sq->sqid != 0) {
> + ret = nvme_init_sq_ioeventfd(sq);
> + sq->ioeventfd_enabled = ret == 0;
> + }
> }
>
> assert(n->cq[cqid]);
Is this “ret == 0” a correct way for error handling?
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?