Re: [PATCH] hw/nvme: fix handling of over-committed queues

2024-10-29 Thread Klaus Jensen
On Oct 28 09:15, Keith Busch wrote: > On Mon, Oct 28, 2024 at 10:01:50AM +0100, Klaus Jensen wrote: > > On Oct 25 10:45, Keith Busch wrote: > > > On Fri, Oct 25, 2024 at 12:50:45PM +0200, Klaus Jensen wrote: > > > > @@ -1520,9 +1520,16 @@ static void nvme_post_cqes(void *opaque) > > > > nv

Re: [PATCH] hw/nvme: fix handling of over-committed queues

2024-10-28 Thread Keith Busch
On Mon, Oct 28, 2024 at 10:01:50AM +0100, Klaus Jensen wrote: > On Oct 25 10:45, Keith Busch wrote: > > On Fri, Oct 25, 2024 at 12:50:45PM +0200, Klaus Jensen wrote: > > > @@ -1520,9 +1520,16 @@ static void nvme_post_cqes(void *opaque) > > > nvme_inc_cq_tail(cq); > > > nvme_sg_unm

Re: [PATCH] hw/nvme: fix handling of over-committed queues

2024-10-28 Thread Klaus Jensen
On Oct 25 10:45, Keith Busch wrote: > On Fri, Oct 25, 2024 at 12:50:45PM +0200, Klaus Jensen wrote: > > @@ -1520,9 +1520,16 @@ static void nvme_post_cqes(void *opaque) > > nvme_inc_cq_tail(cq); > > nvme_sg_unmap(&req->sg); > > + > > +if (QTAILQ_EMPTY(&sq->req_list) && !nvm

Re: [PATCH] hw/nvme: fix handling of over-committed queues

2024-10-25 Thread Waldek Kozaczuk
Hi, I have applied this patch to the same QEMU source tree where I reproduced this issue. I changed the queue size to 3 on the OSv side to trigger this bug, but unfortunately, I still see the same behavior of the OSv guest hanging. Regards, Waldemar Kozaczuk On Fri, Oct 25, 2024 at 6:51 AM Klaus

Re: [PATCH] hw/nvme: fix handling of over-committed queues

2024-10-25 Thread Keith Busch
On Fri, Oct 25, 2024 at 12:50:45PM +0200, Klaus Jensen wrote: > @@ -1520,9 +1520,16 @@ static void nvme_post_cqes(void *opaque) > nvme_inc_cq_tail(cq); > nvme_sg_unmap(&req->sg); > + > +if (QTAILQ_EMPTY(&sq->req_list) && !nvme_sq_empty(sq)) { > +qemu_bh_schedul

[PATCH] hw/nvme: fix handling of over-committed queues

2024-10-25 Thread Klaus Jensen
From: Klaus Jensen If a host chooses to use the SQHD "hint" in the CQE to know if there is room in the submission queue for additional commands, it may result in a situation where there are not enough internal resources (struct NvmeRequest) available to process the command. For a lack of a better