<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/hv/ring_buffer.c, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-12-15T03:27:30Z</updated>
<entry>
<title>Drivers: hv: ring_buffer: eliminate hv_ringbuffer_peek()</title>
<updated>2015-12-15T03:27:30Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vkuznets@redhat.com</email>
</author>
<published>2015-12-15T03:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=940b68e2c3e4ebf032885203c3970e9649f814af'/>
<id>urn:sha1:940b68e2c3e4ebf032885203c3970e9649f814af</id>
<content type='text'>
Currently, there is only one user for hv_ringbuffer_read()/
hv_ringbuffer_peak() functions and the usage of these functions is:
- insecure as we drop ring_lock between them, someone else (in theory
  only) can acquire it in between;
- non-optimal as we do a number of things (acquire/release the above
  mentioned lock, calculate available space on the ring, ...) twice and
  this path is performance-critical.

Remove hv_ringbuffer_peek() moving the logic from __vmbus_recvpacket() to
hv_ringbuffer_read().

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: ring_buffer: remove code duplication from hv_ringbuffer_peek/read()</title>
<updated>2015-12-15T03:27:30Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vkuznets@redhat.com</email>
</author>
<published>2015-12-15T03:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5f53dde8d8e84a6ee200dbd0bd90a400a8fe1a1'/>
<id>urn:sha1:b5f53dde8d8e84a6ee200dbd0bd90a400a8fe1a1</id>
<content type='text'>
hv_ringbuffer_peek() does the same as hv_ringbuffer_read() without
advancing the read index. The only functional change this patch brings
is moving hv_need_to_signal_on_read() call under the ring_lock but this
function is just a couple of comparisons.

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: ring_buffer.c: fix comment style</title>
<updated>2015-12-15T03:27:30Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vkuznets@redhat.com</email>
</author>
<published>2015-12-15T03:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=822f18d4d3e9d4efb4996bbe562d0f99ab82d7dd'/>
<id>urn:sha1:822f18d4d3e9d4efb4996bbe562d0f99ab82d7dd</id>
<content type='text'>
Convert 6+-string comments repeating function names to normal kernel-style
comments and fix a couple of other comment style issues. No textual or
functional changes intended.

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv_vmbus: Fix signal to host condition</title>
<updated>2015-08-05T18:44:29Z</updated>
<author>
<name>Christopher Oo</name>
<email>t-chriso@microsoft.com</email>
</author>
<published>2015-08-05T07:52:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5cca686ce0ef4909deaee4ed46dd991e3a9ece4'/>
<id>urn:sha1:a5cca686ce0ef4909deaee4ed46dd991e3a9ece4</id>
<content type='text'>
Fixes a bug where previously hv_ringbuffer_read would pass in the old
number of bytes available to read instead of the expected old read index
when calculating when to signal to the host that the ringbuffer is empty.
Since the previous write size is already saved, also changes the
hv_need_to_signal_on_read to use the previously read value rather than
recalculating it.

Signed-off-by: Christopher Oo &lt;t-chriso@microsoft.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Enable interrupt driven flow control</title>
<updated>2014-09-24T06:31:22Z</updated>
<author>
<name>K. Y. Srinivasan</name>
<email>kys@microsoft.com</email>
</author>
<published>2014-09-06T00:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=046c7911b224267062ab1caeabbf11bc46e9c152'/>
<id>urn:sha1:046c7911b224267062ab1caeabbf11bc46e9c152</id>
<content type='text'>
In win8 we have a feature that allows for interrupt driven flow management
for host/guest communication. For instance, if the host were blocked because
there was no space available in the ringbuffer, the host could request that the
guest send an interrupt when space becomes available in the ringbuffer (when
the guest drains the ringbuffer).

While this feature was implemented in the guest a while ago, we had not
advertised that the guest supported this feature. This patch advertises
the support to the host.

For pre-win8 hosts, this has no effect since the size of the ringbuffer
control structure has not changed and all changes have been backward
compatible - unused/reserved space has been used to implement this
feature.

In this version of the patch I have cleaned up the commit log based on
feedback from Greg KH.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Cleanup the packet send path</title>
<updated>2014-02-07T23:22:40Z</updated>
<author>
<name>K. Y. Srinivasan</name>
<email>kys@microsoft.com</email>
</author>
<published>2014-02-02T03:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=011a7c3cc3aa60c7ea6bb49d847e80a299ba7b36'/>
<id>urn:sha1:011a7c3cc3aa60c7ea6bb49d847e80a299ba7b36</id>
<content type='text'>
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 &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: hv: check interrupt mask before read_index</title>
<updated>2013-06-24T23:24:17Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2013-06-20T04:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e91e84fa4cfeb67a9a096f1adaa1a1a692474724'/>
<id>urn:sha1:e91e84fa4cfeb67a9a096f1adaa1a1a692474724</id>
<content type='text'>
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 &lt;kys@microsoft.com&gt;
Cc: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by:  K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: hv: switch to use mb() instead of smp_mb()</title>
<updated>2013-06-18T18:14:18Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2013-06-18T05:04:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35848f68b07df3f917cb13fc3c134718669f569b'/>
<id>urn:sha1:35848f68b07df3f917cb13fc3c134718669f569b</id>
<content type='text'>
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 &lt;jasowang@redhat.com&gt;
Cc: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Fix a bug in hv_need_to_signal()</title>
<updated>2013-04-01T19:29:52Z</updated>
<author>
<name>K. Y. Srinivasan</name>
<email>kys@microsoft.com</email>
</author>
<published>2013-03-29T21:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=288fa3e022eb85fa151e0f9bcd15caeb81679af6'/>
<id>urn:sha1:288fa3e022eb85fa151e0f9bcd15caeb81679af6</id>
<content type='text'>
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 &lt;kys@microsoft.com&gt;
Reviewed-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Reported-by: Olaf Hering &lt;olh@suse.de&gt;
Cc: Stable &lt;stable@vger.kernel.org&gt;  (V3.8+)
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: Implement flow management on the send side</title>
<updated>2013-01-17T19:41:49Z</updated>
<author>
<name>K. Y. Srinivasan</name>
<email>kys@microsoft.com</email>
</author>
<published>2012-12-01T14:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2b8e5202cf7670f918d0f7439ed2123cd58e1b7'/>
<id>urn:sha1:c2b8e5202cf7670f918d0f7439ed2123cd58e1b7</id>
<content type='text'>
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 &lt;kys@microsoft.com&gt;
Reviewed-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
