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: "Mark Williamson" <mark.williamson@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] asterisk, ztdummy, and usb (and HZ = 100 under xen ???)
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Sat, 21 May 2005 17:53:10 +1000
Delivery-date: Sat, 21 May 2005 07:52:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVdRkA6XFkLeijpROC2WTxSsi7j6QAksMWg
Thread-topic: [Xen-devel] asterisk, ztdummy, and usb (and HZ = 100 under xen ???)
> > The problem is that the ztdummy driver assumes 1000HZ,
> 
> Do you mean it has a hardcoded value instead of using the "HZ"
macro???
> I'd consider that a bug - have you tried contacting the codes
> maintainers?

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.

James

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