James Harper
2005-May-21 07:53 UTC
RE: [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@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-May-21 09:46 UTC
Re: [Xen-devel] asterisk, ztdummy, and usb (and HZ = 100 under xen ???)
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@lists.xensource.com http://lists.xensource.com/xen-devel