public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-pci; remove the barriers nvme_irq()
@ 2021-02-19  6:37 Chaitanya Kulkarni
  2021-02-19 13:40 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-19  6:37 UTC (permalink / raw)
  To: linux-nvme; +Cc: kbusch, hch, Chaitanya Kulkarni, sagi

The barriers were added to the nvme_irq() in the
commit 3a7afd8ee42a ("nvme-pci: remove the CQ lock for interrupt driven queues")
to prevent compiler from doing memory optimization for the variabes that
were protected previously by spinlock in nvme_irq() at completion queue
processing and with queue head check condition..

The variable nvmeq->last_cq_head from those checks was removed in the
commit f6c4d97b0d82 ("nvme/pci: Remove last_cq_head")") that was
preventing  poll queues from mistakenly triggering the spurious
interrupt detection.

Remove the barriers which were protecting the updates to the variables.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 drivers/nvme/host/pci.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 0045c5edf629..3729775f6a8a 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1062,14 +1062,8 @@ static irqreturn_t nvme_irq(int irq, void *data)
 	struct nvme_queue *nvmeq = data;
 	irqreturn_t ret = IRQ_NONE;
 
-	/*
-	 * The rmb/wmb pair ensures we see all updates from a previous run of
-	 * the irq handler, even if that was on another CPU.
-	 */
-	rmb();
 	if (nvme_process_cq(nvmeq))
 		ret = IRQ_HANDLED;
-	wmb();
 
 	return ret;
 }
-- 
2.22.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] nvme-pci; remove the barriers nvme_irq()
  2021-02-19  6:37 [PATCH 1/2] nvme-pci; remove the barriers nvme_irq() Chaitanya Kulkarni
@ 2021-02-19 13:40 ` Jens Axboe
  2021-02-23  6:54   ` Chaitanya Kulkarni
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2021-02-19 13:40 UTC (permalink / raw)
  To: Chaitanya Kulkarni, linux-nvme; +Cc: kbusch, hch, sagi

On 2/18/21 11:37 PM, Chaitanya Kulkarni wrote:
> The barriers were added to the nvme_irq() in the
> commit 3a7afd8ee42a ("nvme-pci: remove the CQ lock for interrupt driven queues")
> to prevent compiler from doing memory optimization for the variabes that
> were protected previously by spinlock in nvme_irq() at completion queue
> processing and with queue head check condition..
> 
> The variable nvmeq->last_cq_head from those checks was removed in the
> commit f6c4d97b0d82 ("nvme/pci: Remove last_cq_head")") that was
> preventing  poll queues from mistakenly triggering the spurious
> interrupt detection.
> 
> Remove the barriers which were protecting the updates to the variables.

Would seem prudent to just ask the original submitter to send a v2
of his patch, as that's where it came from.

-- 
Jens Axboe


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] nvme-pci; remove the barriers nvme_irq()
  2021-02-19 13:40 ` Jens Axboe
@ 2021-02-23  6:54   ` Chaitanya Kulkarni
  2021-02-23 14:36     ` Heiner Kallweit
  0 siblings, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-23  6:54 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Jens Axboe, kbusch@kernel.org, hch@lst.de,
	linux-nvme@lists.infradead.org, sagi@grimberg.me

(+Heiner)

On 2/19/21 05:40, Jens Axboe wrote:
> On 2/18/21 11:37 PM, Chaitanya Kulkarni wrote:
>> The barriers were added to the nvme_irq() in the
>> commit 3a7afd8ee42a ("nvme-pci: remove the CQ lock for interrupt driven queues")
>> to prevent compiler from doing memory optimization for the variabes that
>> were protected previously by spinlock in nvme_irq() at completion queue
>> processing and with queue head check condition..
>>
>> The variable nvmeq->last_cq_head from those checks was removed in the
>> commit f6c4d97b0d82 ("nvme/pci: Remove last_cq_head")") that was
>> preventing  poll queues from mistakenly triggering the spurious
>> interrupt detection.
>>
>> Remove the barriers which were protecting the updates to the variables.
> Would seem prudent to just ask the original submitter to send a v2
> of his patch, as that's where it came from.
>
Please let me know if you want to send V2 otherwise please ack this series.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] nvme-pci; remove the barriers nvme_irq()
  2021-02-23  6:54   ` Chaitanya Kulkarni
@ 2021-02-23 14:36     ` Heiner Kallweit
  2021-02-23 20:49       ` Chaitanya Kulkarni
  0 siblings, 1 reply; 5+ messages in thread
From: Heiner Kallweit @ 2021-02-23 14:36 UTC (permalink / raw)
  To: Chaitanya Kulkarni
  Cc: Jens Axboe, kbusch@kernel.org, hch@lst.de,
	linux-nvme@lists.infradead.org, sagi@grimberg.me

On 23.02.2021 07:54, Chaitanya Kulkarni wrote:
> (+Heiner)
> 
> On 2/19/21 05:40, Jens Axboe wrote:
>> On 2/18/21 11:37 PM, Chaitanya Kulkarni wrote:
>>> The barriers were added to the nvme_irq() in the
>>> commit 3a7afd8ee42a ("nvme-pci: remove the CQ lock for interrupt driven queues")
>>> to prevent compiler from doing memory optimization for the variabes that
>>> were protected previously by spinlock in nvme_irq() at completion queue
>>> processing and with queue head check condition..
>>>
>>> The variable nvmeq->last_cq_head from those checks was removed in the
>>> commit f6c4d97b0d82 ("nvme/pci: Remove last_cq_head")") that was
>>> preventing  poll queues from mistakenly triggering the spurious
>>> interrupt detection.
>>>
>>> Remove the barriers which were protecting the updates to the variables.
>> Would seem prudent to just ask the original submitter to send a v2
>> of his patch, as that's where it came from.
>>
> Please let me know if you want to send V2 otherwise please ack this series.
> 

Fine with me if you send the patch. You could just add a Reported-by

Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] nvme-pci; remove the barriers nvme_irq()
  2021-02-23 14:36     ` Heiner Kallweit
@ 2021-02-23 20:49       ` Chaitanya Kulkarni
  0 siblings, 0 replies; 5+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-23 20:49 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Jens Axboe, kbusch@kernel.org, hch@lst.de,
	linux-nvme@lists.infradead.org, sagi@grimberg.me

On 2/23/21 06:36, Heiner Kallweit wrote:
>> Please let me know if you want to send V2 otherwise please ack this series.
>>
> Fine with me if you send the patch. You could just add a Reported-by
>
> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
>
Done, please let know if you find any issue with V2.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-23 20:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-19  6:37 [PATCH 1/2] nvme-pci; remove the barriers nvme_irq() Chaitanya Kulkarni
2021-02-19 13:40 ` Jens Axboe
2021-02-23  6:54   ` Chaitanya Kulkarni
2021-02-23 14:36     ` Heiner Kallweit
2021-02-23 20:49       ` Chaitanya Kulkarni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox