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] debug logging in windows

To: "Steven Smith" <steven.smith@xxxxxxxxxx>
Subject: RE: [Xen-devel] debug logging in windows
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Sun, 23 Nov 2008 23:32:34 +1100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 23 Nov 2008 04:34:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20081113030128.GA18035@xxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AEC6C66638C05B468B556EA548C1A77D0154FB11@trantor> <20081110181659.GC8252@xxxxxxxxxxxxxxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D0154FB44@trantor> <20081113030128.GA18035@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AclFPG8nawy+9gREQg25GEk4k28qJQIKSgiA
Thread-topic: [Xen-devel] debug logging in windows
> 
> > Is there something similar implemented via hvm/qemu that can log via
hvm
> > log files? That would make life easier. If not, I'll implement it.
> There isn't at the moment, at least not in the xenbits repositories.
> There is one in the XenServer version of qemu, though.  I've attached
> the relevant patch.  If you apply this and rebuild qemu then you
> should be able to send stuff to the qemu logfile by writing bytes to
> port 0x12.  Note that this is rate limited, though, and if you hit the
> limiter the domain will be quite severely punished.
> 
> I've checked that this applies against qemu-xen-unstable.git, and that
> the resulting tree at least builds, but I've not actually checked that
> it works.  Upstream qemu is pretty similar to XenServer qemu at the
> moment, though, so it should be okay.
> 

I'd love to see this in 3.3.1... what are the chances?

The only change I'd like to make is one that I did in my own version
which is to keep separate log buffers per io port (with the intent that
each DomU CPU writes to a different port), as I was finding the log
messages from different CPU's writing at the same time causing garbled
messages. Synchronising access to the io port between different drivers
in windows would require a heap of overhead.

By making sure in the DomU that each CPU uses port (0x10 + (cpu# &
0x0f)) each CPU only has to disable interrupts on the local CPU while
writing the log message. Obviously with #cpu's > 16 you will get some
merged log messages, but this would be less of a problem than the mess I
was seeing when logging at a high rate.

Basically the change is to use the full range of 16 ports, and declare
log_buffer[16][4096] and use the port offset from 0x10 as the first
index into the array, and obviously index all the other variables that
manage the buffer. I also prefix each message with the CPU number (eg
'06: '). The throttling would remain global.

Having this in 3.3.1 would make it heaps easier to get debug info from
people having problems with the GPLPV drivers!

I can put my changes in and submit a patch if the above sounds
reasonable...

Thanks

James


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