WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] unconditionally enable the trace buffer

To: "Mark Williamson" <mark.williamson@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] unconditionally enable the trace buffer
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Fri, 28 Oct 2005 01:24:49 +0100
Cc: Rob Gardner <rob.gardner@xxxxxx>
Delivery-date: Fri, 28 Oct 2005 00:22:04 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXbTV/4WKv+nQGxQvSRVaZVvlcqcwAB118Q
Thread-topic: [Xen-devel] unconditionally enable the trace buffer
 

> > >* ability to turn on/off via hypercall
> >
> > Not currently implemented, but would not be difficult to add.
> 
> Just as an aside I'm not sure this matters: From what Rob's 
> told me, having the (inline) trace() calls in there produces 
> the same overhead whether tracing is active or not.  I guess 
> it makes sense; once you've incurred the overhead of having 
> the function there and evaluating the "is tracing on" 
> conditional, you might as well have stored a few values also ;-)

We could cache miss on reading the tracebuffer producer counter and
tracebuffer base address, so its not totally a done deal.

I don't have a big worry about performance, but I'd feel more
comfortable to see a more realistic assesment of overhead. Comparing
results from ttcp in a domU with 128k sock buf and the MTU set to 552
bytes should do it.
 
> > >* ability to set the per CPU tracebuffer size when turning it on
> >
> > Partially; You can enable the trace buffer on the xen 
> (boot) command 
> > line, and you can specify the trace buffer size there. You cannot 
> > change the size dynamically.
> 
> Aside #2: You can disable at boot time by setting size=0.

Ideally, it should be set as part of the hypercall to turn tracing on.

> > >* ability for the user-space reader to explicitly block (select on 
> > >fd) on an eventchn notification that the buffer is e.g. half full. 
> > >(reader should write out all the pages that are full of 
> trace events)
> >
> > Not done.
> 
> We can just block on /dev/evtchn, I guess.  Shouldn't be too 
> hard; we just need to define a new "trace" virq.

The polling stuff totally sucks, and we definitely need the virq.

> > >* user space reader should log when it misses blocks of events 
> > >(overwrite last trace message in buffer with a special 
> 'missed X events'
> > >message)
> >
> > Not done, but my XenMon patch includes a change to the trace buffer 
> > code to help with this. I've added a "sequence number" to 
> each trace 
> > record which can be used to detect when blocks of events 
> have been missed.

My scheme avoids burning tracebuffer memory, but OK.

Ian

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel