[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: "Rob Gardner" <rob.gardner@xxxxxx>
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.