Subject: Re: Updated Xen domain 0 benchmarking results
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-xen
Date: 06/28/2005 15:34:24
On Tue, Jun 28, 2005 at 01:27:14PM +0300, Martti Kuparinen wrote:
> Hi!
> 
> I ran again some dom0 benchmarking (NetBSD vs Linux).
> 
> http://users.piuha.net/martti/comp/xendom0/xendom0.html

"Some of the numbers produced by /usr/bin/time are negative. This is a bug in
 NetBSD/xen which needs to be fixed. Fortunately the "real" numbers are all
 valid so it's possible to calculate mean values."


I think this is fixed in current - at last I've not seen time going backward
since I use this patch on production systems.
The change is:

Index: clock.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/xen/clock.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- clock.c	27 May 2005 22:02:25 -0000	1.12
+++ clock.c	25 Jun 2005 18:44:59 -0000	1.13
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.12 2005/05/27 22:02:25 bouyer Exp $	*/
+/*	$NetBSD: clock.c,v 1.13 2005/06/25 18:44:59 bouyer Exp $	*/
 
 /*
  *
@@ -34,7 +34,7 @@
 #include "opt_xen.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.12 2005/05/27 22:02:25 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.13 2005/06/25 18:44:59 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -224,8 +224,10 @@
 void
 xen_microtime(struct timeval *tv)
 {
-
-	*tv = time;
+	int s = splclock();
+	get_time_values_from_xen();
+	*tv = shadow_tv;
+	splx(s);
 }
 
 void


I will request a pullup today or tomorow.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--