[PATCH v2 3/4] nvme-pci: factor out the cqe reading mechanics from __nvme_process_cq

Keith Busch keith.busch at intel.com
Mon Jun 19 09:19:53 PDT 2017


On Sun, Jun 18, 2017 at 05:28:09PM +0300, Sagi Grimberg wrote:
> Also, maintain a consumed counter to rely on for doorbell and
> cqe_seen update instead of directly relying on the cq head and phase.
> 
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>

Looks like this particular change failed to produce the best diff. :)

> -	nvme_ring_cq_doorbell(nvmeq);
> +		if (tag && *tag == cqe.command_id) {
> +			*tag = -1;
> +			break;

This 'break' is new. We're already holding the lock, why wouldn't we
want to reap all the completions?



More information about the Linux-nvme mailing list