qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 17/17] block/nvme: Check BDRVNVMeState::plugged out of nvme_p


From: Stefan Hajnoczi
Subject: Re: [PATCH 17/17] block/nvme: Check BDRVNVMeState::plugged out of nvme_process_completion
Date: Fri, 26 Jun 2020 13:46:36 +0100

On Thu, Jun 25, 2020 at 08:48:38PM +0200, Philippe Mathieu-Daudé wrote:
> @@ -529,10 +529,13 @@ static bool nvme_poll_queues(BDRVNVMeState *s)
>      bool progress = false;
>      int i;
>  
> +    if (s->plugged) {
> +        return false;
> +    }
>      for (i = 0; i < s->nr_queues; i++) {
>          NVMeQueuePair *q = s->queues[i];
>          qemu_mutex_lock(&q->lock);
> -        while (nvme_process_completion(s, q)) {
> +        while (nvme_process_completion(q)) {
>              /* Keep polling */
>              progress = true;
>          }

This code transformation is correct but I hope plugged can be removed
from the completion code path in the future since its purpose is for
batching submissions.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]