[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/nvme: fix handling of over-committed queues
From: |
Klaus Jensen |
Subject: |
Re: [PATCH] hw/nvme: fix handling of over-committed queues |
Date: |
Mon, 28 Oct 2024 10:01:50 +0100 |
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) && !nvme_sq_empty(sq)) {
> > + qemu_bh_schedule(sq->bh);
> > + }
> > +
> > QTAILQ_INSERT_TAIL(&sq->req_list, req, entry);
> > }
>
> Shouldn't we schedule the bottom half after the req has been added to
> the list? I think everything the callback needs to be written prior to
> calling qemu_bh_schedule().
>
Not as far as I know. It is only queued up; it won't be executed
immediately. It might run next (ASAP) if we are already in a bottom
half, but not before whatever context we are in returns.
signature.asc
Description: PGP signature