[PATCH] nvme: use lighter smp barriers in nvme_irq

Heiner Kallweit hkallweit1 at gmail.com
Sun Feb 14 11:24:55 EST 2021


Based on the description we should be fine using the less heavy-weight
smp barriers here. On x86 this would be compiler barriers only.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 drivers/nvme/host/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 7b6632c00..59fee4a60 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1066,10 +1066,10 @@ static irqreturn_t nvme_irq(int irq, void *data)
 	 * 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();
+	smp_rmb();
 	if (nvme_process_cq(nvmeq))
 		ret = IRQ_HANDLED;
-	wmb();
+	smp_wmb();
 
 	return ret;
 }
-- 
2.30.1




More information about the Linux-nvme mailing list