diff mbox series

bus/vmbus: use SMP memory barrier for signaling read

Message ID 1595017109-22952-1-git-send-email-longli@linuxonhyperv.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series bus/vmbus: use SMP memory barrier for signaling read | expand

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Long Li July 17, 2020, 8:18 p.m. UTC
From: Long Li <longli@microsoft.com>

rte_smp_mb() uses the same locked ADD as the in-kernel vmbus driver,
and it has slightly performance improvement over rte_mb().

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/bus/vmbus/vmbus_channel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Monjalon July 29, 2020, 2:11 p.m. UTC | #1
17/07/2020 22:18, Long Li:
> From: Long Li <longli@microsoft.com>
> 
> rte_smp_mb() uses the same locked ADD as the in-kernel vmbus driver,
> and it has slightly performance improvement over rte_mb().
> 
> Signed-off-by: Long Li <longli@microsoft.com>

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c
index aaa801d88..c60470332 100644
--- a/drivers/bus/vmbus/vmbus_channel.c
+++ b/drivers/bus/vmbus/vmbus_channel.c
@@ -214,7 +214,7 @@  void rte_vmbus_chan_signal_read(struct vmbus_channel *chan, uint32_t bytes_read)
 		return;
 
 	/* Make sure reading of pending happens after new read index */
-	rte_mb();
+	rte_smp_mb();
 
 	pending_sz = rbr->vbr->pending_send;
 	if (!pending_sz)