public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: "Liu, Eric E" <eric.e.liu@intel.com>
Cc: kvm-ppc-devel@lists.sourceforge.net,
	Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>,
	kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-ppc-devel] [PATCH 1/5]Add some trace markers and exposeinterfaces in kernel for tracing
Date: Mon, 21 Apr 2008 16:22:49 -0500	[thread overview]
Message-ID: <200804211622.49661.hollisb@us.ibm.com> (raw)
In-Reply-To: <9D7649D18729DE4BB2BD7B494F7FEDC2012C32FA@pdsmsx415.ccr.corp.intel.com>

On Sunday 20 April 2008 00:38:32 Liu, Eric E wrote:
> Christian Ehrhardt wrote:
> > Liu, Eric E wrote:
> >> Hollis Blanchard wrote:
> >>> On Wednesday 16 April 2008 01:45:34 Liu, Eric E wrote: [...]
> >>> Actually... we could have kvmtrace itself insert the metadata, so
> >>> there would be no chance of it being overwritten in the kernel
> >>> buffers. The header could be written in tip_open_output(), and
> >>> update fs_size accordingly. 
> >>> 
> >> Yes, let kvmtrace insert the metadata is more reasonable.
> >> 
> > 
> > I wanted to note that the kvmtrace tool should, but not need to know
> > everything about the data format. 
> > I think of e.g. changing kernel implementations that change endianess
> > or even flags we don't yet know, but we might need in the future. 
> > 
> > What about adding another debugfs entry the kernel can use to expose
> > the "kvmtrace-metadata" defined by the kernel implementation. 
> > The kvmtrace tool could then use that to build up the record by using
> > one entry for kernel defined metadata and another to add any metadata
> > that would be defined by kvmtrace tool itself.  
> > 
> > what about that one:
> > 	struct metadata {
> > 		u32 kmagic; /* stores kernel defined metadata read from
> debugfs
> > 		entry */ u32 umagic; /* stores userspace tool defined
> metadata */
> > 		u32 extra;  /* it is redundant, only use to fit into
> record. */
> > 	}
> > 
> > That should give us the flexibility to keep the format if we get more
> > metadata requirements in the future. 
> 
> Yes, maybe we need metadata to indicate the changing kernel
> implementations in the future, but adding debugfs entry seems not a good
> approach. What about defining a similar metadat in kernel rather than in
> userland and write it in rchan at the first time we add trace data. Then
> we don't need kvmtrace tool to insert the medadata again.
> like this: 
> 	struct kvm_trace_metadata {
> 		u32 kmagic; /* stores kernel defined metadata */
>  		u64 extra;  /* use to fit into record. */
>  	}

So you've gone back to the idea about the kernel inserting a special trace 
record? How do you handle the case where this record is overwritten before 
the logging app gets a chance to extract it? This issue is why I would prefer 
Christian's idea of a separate debugfs file (*not* relay channel) to export 
kernel flags.

At that point, kvmtrace can insert the flags in any way it wants. It doesn't 
need to appear as a trace record at all; it should simply be a header at the 
beginning of the trace file.

-- 
Hollis Blanchard
IBM Linux Technology Center

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-04-21 21:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09 10:01 [PATCH 1/5]Add some trace markers and expose interfaces in kernel for tracing Liu, Eric E
2008-04-15 20:57 ` Hollis Blanchard
2008-04-16  3:13   ` [PATCH 1/5]Add some trace markers and exposeinterfaces " Liu, Eric E
2008-04-16  5:34     ` Hollis Blanchard
2008-04-16  6:45       ` Liu, Eric E
2008-04-17 21:59         ` [kvm-ppc-devel] " Hollis Blanchard
2008-04-18  1:41           ` Liu, Eric E
2008-04-18  6:08             ` Christian Ehrhardt
2008-04-20  5:38               ` Liu, Eric E
2008-04-21 21:22                 ` Hollis Blanchard [this message]
2008-04-22  2:20                   ` Liu, Eric E

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=200804211622.49661.hollisb@us.ibm.com \
    --to=hollisb@us.ibm.com \
    --cc=ehrhardt@linux.vnet.ibm.com \
    --cc=eric.e.liu@intel.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=kvm-ppc-devel@lists.sourceforge.net \
    /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