All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Hank Janssen <hjanssen@microsoft.com>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"virtualization@lists.osdl.org" <virtualization@lists.osdl.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Hashir Abdi <habdi@microsoft.com>
Subject: Re: Ringbuffer usage in Linux Hyper-V drivers
Date: Wed, 03 Mar 2010 09:49:04 -0800	[thread overview]
Message-ID: <4B8EA110.1040200@goop.org> (raw)
In-Reply-To: <8AFC7968D54FB448A30D8F38F259C56212EE39C0@TK5EX14MBXC116.redmond.corp.microsoft.com>

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

  reply	other threads:[~2010-03-03 17:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 20:58 [PATCH 1/1] Stage: hv: Rename struct device_context and re-arrange the fields inside (re-formatted) Haiyang Zhang
2010-02-17 21:05 ` Greg KH
2010-02-17 23:50 ` Greg KH
2010-02-17 23:52 ` Greg KH
2010-02-18 15:51   ` Haiyang Zhang
2010-03-03 16:42   ` Ringbuffer usage in Linux Hyper-V drivers Hank Janssen
2010-03-03 17:49     ` Jeremy Fitzhardinge [this message]
2010-03-03 23:39     ` Greg KH
2010-03-04 17:46 ` [PATCH 1/1] Stage: hv: Remove Ringbuffer from TODO line Hank Janssen
2010-03-04 17:48 ` [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format Hank Janssen
2010-03-04 17:55   ` Joe Perches
2010-03-04 18:03   ` Randy Dunlap
2010-03-04 18:11     ` Hank Janssen
2010-03-04 22:11 ` [PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format-CORRECTED Hank Janssen
2010-03-04 22:11   ` Hank Janssen
2010-03-04 22:37   ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B8EA110.1040200@goop.org \
    --to=jeremy@goop.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=habdi@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hjanssen@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.