Re: Ringbuffer usage in Linux Hyper-V drivers

2010-03-03 Thread Jeremy Fitzhardinge
On 03/03/2010 08:42 AM, Hank Janssen wrote:
 There is a pretty good chance that ring buffer on Hyper-V will change to 
 support
 additional functionality. I did further investigations to check on other
 virtualization technologies. And this same things seems to be true for XEN,
 they also implemented their own ring buffer implementation on the guest side
 because of their host side implementation.


Yes.  The cross-domain producer-consumer ringbuffer is a pretty specific 
protocol.  Not only is the data format an ABI, but the exact protocol 
for what pointers get updated when, etc.  Its not at all obvious how we 
could reuse the kernel ringbuffer implementation, since it assumes its 
implementing both the producer and consumer ends.

 So my question is to the community at large, am I missing something that would
 enable me to use an existing ring buffer functionality somehow in the kernel?
 If not, I want to remove the line from the TODO file that is requesting to 
 use the
 in-kernel ring buffer functionality.

 Finally, while checking this out, I looked at a bunch of non virtualization 
 device
 drivers currently in the kernel. And all the ones I looked at have
 implemented their own ring buffer. Is there a reason why this might be the 
 case?


linux/ring_buffer.h is relatively new, and probably post-dates most of 
the driver ringbuffers.  If the ringbuffer is entirely within the kernel 
(say, between an ISR and the rest of the kernel) then I guess it might 
be possible to use the standard functions.  But if half the ringbuffer 
is being managed by the device itself, then that will define the protocol.

 J
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


Re: Ringbuffer usage in Linux Hyper-V drivers

2010-03-03 Thread Greg KH
On Wed, Mar 03, 2010 at 04:42:27PM +, Hank Janssen wrote:
 The ring buffer in the Hyper-V Linux drivers is used to communicate with the 
 parent partition running Server 2008 Hyper-V. The ring buffer functionality 
 on 
 the Hyper-V Linux drivers is written to be functionally compatible with the 
 ring buffer functionality on the Hyper-V Server. Consequently, it is not 
 possible to make any changes that might break the compatibility with server 
 side ring buffer implementation.  

Ok, that makes sense, feel free to remove that TODO item.

thanks for looking into this.

greg k-h
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization