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] asterisk, ztdummy, and usb (and HZ = 100 under xen ???)

To: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] asterisk, ztdummy, and usb (and HZ = 100 under xen ???)
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sat, 21 May 2005 10:46:54 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Delivery-date: Sat, 21 May 2005 09:49:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D7A0B9B@xxxxxxxxxxxxxxxxxxxxxxx>
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: <AEC6C66638C05B468B556EA548C1A77D7A0B9B@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 21 May 2005, at 08:53, James Harper wrote:

It's not as straight forward as that. Asterisk needs a 1000hz timer for
certain functions to work. For certain things to work really properly
(eg fax), this timer needs to be synchronised exactly to the exchange
(eg from the isdn/e1 card) otherwise frames might be dropped.

Under 2.4, the ztdummy driver uses the UHCI USB hardware to get a 1000hz
interval. Under 2.6, HZ=1000 (on the x86 anyway, except under xen :) so
it counts jiffies instead. If you have HZ=100 then you can't get 1000
ticks from it no matter what macro you use, so the best you could do
would be to fall back to UHCI timing when HZ is not evenly divisible by
1000, or fail if no UHCI controller is present.

I'm surprised my patch (eg generate 10 ticks ever 1/100 seconds) works
as well as it does.

We're going to rip the fixed ticker out of Xen and allow domains to specify a background ticker at a rate of their choice, which ought to fix this for you. OF course, you're pretty screwed running this kind of thing on Xen unless you dedicate a whole CPU to the relevant domain.

 -- Keir


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