aboutsummaryrefslogtreecommitdiff
path: root/drivers/hv/ring_buffer.c
AgeCommit message (Collapse)AuthorFilesLines
2014-02-07Drivers: hv: vmbus: Cleanup the packet send pathK. Y. Srinivasan1-10/+7
The current channel code is using scatterlist abstraction to pass data to the ringbuffer API on the send path. This causes unnecessary translations between virtual and physical addresses. Fix this. Signed-off-by: K. Y. Srinivasan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-24drivers: hv: check interrupt mask before read_indexJason Wang1-0/+2
This patches add a read barriers to force the driver to check the interrupt mask before read_index. Otherwise we may lost a kick to host. Cc: K. Y. Srinivasan <[email protected]> Cc: Haiyang Zhang <[email protected]> Signed-off-by: Jason Wang <[email protected]> Signed-off-by: K. Y. Srinivasan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-18drivers: hv: switch to use mb() instead of smp_mb()Jason Wang1-5/+5
Even if guest were compiled without SMP support, it could not assume that host wasn't. So switch to use mb() instead of smp_mb() to force memory barriers for UP guest. Signed-off-by: Jason Wang <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: stable <[email protected]> Signed-off-by: K. Y. Srinivasan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-01Drivers: hv: vmbus: Fix a bug in hv_need_to_signal()K. Y. Srinivasan1-0/+1
As part of updating the vmbus protocol, the function hv_need_to_signal() was introduced. This functions helps optimize signalling from guest to host. The newly added memory barrier is needed to ensure that we correctly decide when to signal the host. Signed-off-by: K. Y. Srinivasan <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Reported-by: Olaf Hering <[email protected]> Cc: Stable <[email protected]> (V3.8+) Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-17Drivers: hv: Implement flow management on the send sideK. Y. Srinivasan1-1/+50
Implement flow management on the send side. When the sender is blocked, the reader can potentially signal the sender to indicate there is now room to send. Signed-off-by: K. Y. Srinivasan <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-17Drivers: hv: Get rid of hv_get_ringbuffer_interrupt_mask()K. Y. Srinivasan1-13/+0
This function is no longer used; get rid of it. Signed-off-by: K. Y. Srinivasan <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-17Drivers: hv: Optimize the signaling on the write pathK. Y. Srinivasan1-3/+39
The host has already implemented the "read" side optimizations. Leverage that to optimize "write" side signaling. Signed-off-by: K. Y. Srinivasan <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-17Drivers: hv: Implement routines for read side signaling optimizationK. Y. Srinivasan1-0/+24
Implement functions that will support read-side signaling optimization. By having the reader indicate the start of the "read" operation and the "end" of the read operation we can more efficiently handle the signaling protocol: while the read is in progress, there is no need for the "writer" to signal the "reader" as new items are put on the read queue. Signed-off-by: K. Y. Srinivasan <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-03net/hyperv: Add flow control based on hi/low watermarkHaiyang Zhang1-31/+0
In the existing code, we only stop queue when the ringbuffer is full, so the current packet has to be dropped or retried from upper layer. This patch stops the tx queue when available ringbuffer is below the low watermark. So the ringbuffer still has small amount of space available for the current packet. This will reduce the overhead of retries on sending. Signed-off-by: Haiyang Zhang <[email protected]> Reviewed-by: K. Y. Srinivasan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-11Staging: hv: remove last user of DPRINT() macroGreg Kroah-Hartman1-31/+0
This also removed the unused function hv_dump_ring_info(). Cc: K. Y. Srinivasan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-10Staging: hv: move hyperv code out of staging directoryGreg Kroah-Hartman1-0/+527
After many years wandering the desert, it is finally time for the Microsoft HyperV code to move out of the staging directory. Or at least the core hyperv bus code, and the utility driver, the rest still have some review to get through by the various subsystem maintainers. Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: K. Y. Srinivasan <[email protected]>