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-tools

Re: [Xen-devel] Hi,something about the xentrace tool

To: "Rob Gardner" <rob.gardner@xxxxxx>
Subject: Re: [Xen-devel] Hi,something about the xentrace tool
From: "George Dunlap " <dunlapg@xxxxxxxxx>
Date: Sun, 18 Jun 2006 21:06:18 -0400
Cc: xen-tools@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx, rickey berkeley <rickey.berkeley@xxxxxxxxx>
Delivery-date: Sun, 18 Jun 2006 18:06:42 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=ZAGYahBbHfmS1rvhCsIZ7mMUjASGz25b1xcF7Mdx+pf/OtZbnBgJAHpqB/7vpGaXbXf+6bvRGxFIQv31BCm0gKj2gvLvnTvjUBBPZ3do+q4t7TE7fShDSqVeJTsUOfceaj9SsQF+tGC9MaUg6w48GsI4PCPdS0QvH5nbjda1iow=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4491AC9A.2090906@xxxxxx>
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>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D4BAAAA@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <8061f8830606150158m35f11025t43c3fa962ccd6679@xxxxxxxxxxxxxx> <449192E1.4080808@xxxxxx> <de76405a0606151120m5f333609s126bda4d33e73ef@xxxxxxxxxxxxxx> <4491AC9A.2090906@xxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 6/15/06, Rob Gardner <rob.gardner@xxxxxx> wrote:
> If someone were really worried about copy time, one could write
> something which uses raw disks (or, perhaps, the O_DIRECT flag) to DMA
> data straight from the buffers to the disk.

Once again, there is no explicit copying of the data between kernel and
user space, so nobody should be worried about it.

There's no copying from the HV to the xentrace process.  But there is
copying from xentrace to the dom0 kernel for the output file.  Some
copying is necessary right now, because rather than writing out the
pages verbatim, xentrace writes out the pcpu before writing out each
record:

void write_rec(unsigned int cpu, struct t_rec *rec, FILE *out)
{
   size_t written = 0;
   written += fwrite(&cpu, sizeof(cpu), 1, out);
   written += fwrite(rec, sizeof(*rec), 1, out);
   if ( written != 2 )
   {
       PERROR("Failed to write trace record");
       exit(EXIT_FAILURE);
   }
}

If we wanted to make it zero copy all the way from the HV to the disk,
we could have the xentrace process one stream per cpu, and do
whatever's necessary to use DMA.  (Does anyone know if O_DIRECT will
do direct DMA, or if one would have to use a raw disk?)

But I think we all seem to agree, this is not a high priority. :-)

-George

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