From: Hollis Blanchard <hollisb@us.ibm.com>
To: "Tan, Li" <li.tan@intel.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>,
kvm-ppc-devel@lists.sourceforge.net
Subject: Re: kvm trace support for ppc
Date: Wed, 14 May 2008 16:37:03 -0500 [thread overview]
Message-ID: <200805141637.03442.hollisb@us.ibm.com> (raw)
In-Reply-To: <08DF4D958216244799FC84F3514D70F0015B1B58@pdsmsx415.ccr.corp.intel.com>
On Tuesday 13 May 2008 03:06:19 Tan, Li wrote:
> Hollisb,
> I have 2 more questions:
> 1. seems record won't be overwritten because current code is as following:
> /*
> * The relay channel is used in "no-overwrite" mode, it keeps trace of how
> * many times we encountered a full subbuffer, to tell user space app the
> * lost records there were.
> */
> static int kvm_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
> void *prev_subbuf, size_t prev_padding)
> {
> struct kvm_trace *kt;
>
> if (!relay_buf_full(buf))
> return 1;
>
> kt = buf->chan->private_data;
> atomic_inc(&kt->lost_records);
>
> return 0;
> }
>
> 2. Then needn't expose debugfs entry "kvmtrace-metadata", we can use
existing relayfs to output struct metadata with kmagic, if we update code as
following?
> static int kvm_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
> void *prev_subbuf, size_t prev_padding)
> {
> struct kvm_trace *kt;
>
> if (!relay_buf_full(buf))
> {
> if (!prev_subbuf) {
> //here is executed only once (when the channel is opened)
> subbuf_start_reserve(buf, sizeof(struct metadata));
> ((struct metadata *)subbuf)->kmagic = 0x1234;
> }
>
> return 1;
> }
>
> kt = buf->chan->private_data;
> atomic_inc(&kt->lost_records);
>
> return 0;
> }
Ah, I didn't understand what the "lost records" handling was about. Given that
it won't be lost, it would be OK for the kernel to export the header, and in
that case I guess you would want it to be the same size as the other records.
I'm not sure how I feel about that from a layering point of view, but at
least it would be functional.
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next parent reply other threads:[~2008-05-14 21:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <08DF4D958216244799FC84F3514D70F0015B1B58@pdsmsx415.ccr.corp.intel.com>
2008-05-14 21:37 ` Hollis Blanchard [this message]
2008-05-15 1:20 ` kvm trace support for ppc Tan, Li
2008-05-16 6:26 ` Tan, Li
2008-05-20 6:53 ` [PATCH] [RFC][PATCH] kvm: kvmtrace: kvm_trace in kernel for supporting big_endian Tan, Li
2008-05-20 7:03 ` [PATCH] [RFC][PATCH] kvm: kvmtrace: kvmtrace_format " Tan, Li
2008-05-20 16:22 ` Avi Kivity
2008-05-21 7:36 ` Tan, Li
2008-05-21 9:21 ` Avi Kivity
2008-05-22 0:30 ` Tan, Li
2008-05-25 9:34 ` Avi Kivity
2008-05-26 5:38 ` Tan, Li
2008-05-28 11:17 ` Avi Kivity
2008-06-02 1:25 ` Tan, Li
2008-05-20 16:25 ` [PATCH] [RFC][PATCH] kvm: kvmtrace: kvm_trace in kernel " Avi Kivity
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=200805141637.03442.hollisb@us.ibm.com \
--to=hollisb@us.ibm.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=kvm-ppc-devel@lists.sourceforge.net \
--cc=li.tan@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox