From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Borislav Petkov <bp@amd64.org>,
Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>,
Ohad Ben-Cohen <ohad@wizery.com>,
Grant Likely <grant.likely@secretlab.ca>,
qemu-devel@nongnu.org, Linus Walleij <linus.walleij@linaro.org>,
Rusty Russell <rusty@rustcorp.com.au>,
linux-kernel@vger.kernel.org,
Borislav Petkov <borislav.petkov@amd.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
systemtap@sourceware.org, Joerg Roedel <joerg.roedel@amd.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
yrl.pp-manager.tt@hitachi.com, Cam Macdonell <cam@cs.ualberta.ca>,
Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
Subject: Re: [Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem
Date: Wed, 6 Jun 2012 08:22:10 +0900 [thread overview]
Message-ID: <20120605232210.GA8858@kroah.com> (raw)
In-Reply-To: <4FCE902A.3060603@codemonkey.ws>
On Wed, Jun 06, 2012 at 07:03:06AM +0800, Anthony Liguori wrote:
> On 06/05/2012 09:10 PM, Borislav Petkov wrote:
> >On Tue, Jun 05, 2012 at 10:01:17PM +0900, Yoshihiro YUNOMAE wrote:
> >>This patch adds a ring-buffer driver for IVShmem device, a virtual RAM device in
> >>QEMU. This driver can be used as a ring-buffer for kernel logging or tracing of
> >>a guest OS by recording kernel programing or SystemTap.
> >>
> >>This ring-buffer driver is implemented very simple. First 4kB of shared memory
> >>region is control structure of a ring-buffer. In this region, some values for
> >>managing the ring-buffer is stored such as bits and mask of whole memory size,
> >>writing position, threshold value for notification to a reader on a host OS.
> >>This region is used by the reader to know writing position. Then, "total
> >>memory size - 4kB" equals to usable memory region for recording data.
> >>This ring-buffer driver records any data from start to end of the writable
> >>memory region.
> >>
> >>When writing size exceeds a threshold value, this driver can notify a reader
> >>to read data by using writel(). As this later patch, reader does not have any
> >>function for receiving the notification. This notification feature will be used
> >>near the future.
> >>
> >>As a writer records data in this ring-buffer, spinlock function is used to
> >>avoid competing by some writers in multi CPU environment. Not to use spinlock,
> >>lockless ring-buffer like as ftrace and one ring-buffer one CPU will be
> >>implemented near the future.
> >
> >Yet another ring buffer?
> >
> >We already have an ftrace and perf ring buffer, can't you use one of those?
>
> Not to mention virtio :-)
>
> Why not just make a virtio device for this kind of thing?
Yeah, that's exactly what I was thinking, why reinvent things again?
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Borislav Petkov <borislav.petkov@amd.com>,
Joerg Roedel <joerg.roedel@amd.com>,
Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>,
Rusty Russell <rusty@rustcorp.com.au>,
qemu-devel@nongnu.org, Borislav Petkov <bp@amd64.org>,
linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
systemtap@sourceware.org, yrl.pp-manager.tt@hitachi.com,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Akihiro Nagai <akihiro.nagai.hw@hitachi.com>,
Cam Macdonell <cam@cs.ualberta.ca>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem
Date: Wed, 6 Jun 2012 08:22:10 +0900 [thread overview]
Message-ID: <20120605232210.GA8858@kroah.com> (raw)
In-Reply-To: <4FCE902A.3060603@codemonkey.ws>
On Wed, Jun 06, 2012 at 07:03:06AM +0800, Anthony Liguori wrote:
> On 06/05/2012 09:10 PM, Borislav Petkov wrote:
> >On Tue, Jun 05, 2012 at 10:01:17PM +0900, Yoshihiro YUNOMAE wrote:
> >>This patch adds a ring-buffer driver for IVShmem device, a virtual RAM device in
> >>QEMU. This driver can be used as a ring-buffer for kernel logging or tracing of
> >>a guest OS by recording kernel programing or SystemTap.
> >>
> >>This ring-buffer driver is implemented very simple. First 4kB of shared memory
> >>region is control structure of a ring-buffer. In this region, some values for
> >>managing the ring-buffer is stored such as bits and mask of whole memory size,
> >>writing position, threshold value for notification to a reader on a host OS.
> >>This region is used by the reader to know writing position. Then, "total
> >>memory size - 4kB" equals to usable memory region for recording data.
> >>This ring-buffer driver records any data from start to end of the writable
> >>memory region.
> >>
> >>When writing size exceeds a threshold value, this driver can notify a reader
> >>to read data by using writel(). As this later patch, reader does not have any
> >>function for receiving the notification. This notification feature will be used
> >>near the future.
> >>
> >>As a writer records data in this ring-buffer, spinlock function is used to
> >>avoid competing by some writers in multi CPU environment. Not to use spinlock,
> >>lockless ring-buffer like as ftrace and one ring-buffer one CPU will be
> >>implemented near the future.
> >
> >Yet another ring buffer?
> >
> >We already have an ftrace and perf ring buffer, can't you use one of those?
>
> Not to mention virtio :-)
>
> Why not just make a virtio device for this kind of thing?
Yeah, that's exactly what I was thinking, why reinvent things again?
greg k-h
next prev parent reply other threads:[~2012-06-05 23:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 10:49 [RFC PATCH 0/2] ivring: Add IVRing driver Yoshihiro YUNOMAE
2012-06-05 10:49 ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-06-05 10:50 ` [Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem Yoshihiro YUNOMAE
2012-06-05 10:50 ` [RFC PATCH 2/2] ivring: Add a ring-buffer reader tool Yoshihiro YUNOMAE
2012-06-05 10:50 ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-06-05 13:01 ` [Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem Yoshihiro YUNOMAE
2012-06-05 13:10 ` Borislav Petkov
2012-06-05 13:10 ` [Qemu-devel] " Borislav Petkov
2012-06-05 14:13 ` Yoshihiro YUNOMAE
2012-06-05 14:13 ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-06-05 23:03 ` Anthony Liguori
2012-06-05 23:03 ` Anthony Liguori
2012-06-05 23:22 ` Greg Kroah-Hartman [this message]
2012-06-05 23:22 ` Greg Kroah-Hartman
2012-06-06 14:44 ` Masami Hiramatsu
2012-06-06 14:44 ` Masami Hiramatsu
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=20120605232210.GA8858@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=acme@redhat.com \
--cc=akihiro.nagai.hw@hitachi.com \
--cc=anthony@codemonkey.ws \
--cc=borislav.petkov@amd.com \
--cc=bp@amd64.org \
--cc=cam@cs.ualberta.ca \
--cc=grant.likely@secretlab.ca \
--cc=joerg.roedel@amd.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=myungjoo.ham@samsung.com \
--cc=ohad@wizery.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=systemtap@sourceware.org \
--cc=yoshihiro.yunomae.ez@hitachi.com \
--cc=yrl.pp-manager.tt@hitachi.com \
/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.