[asterisk-bugs] [Zaptel 0010314]: [patch] Merged in support for high resolution timers in kernel >=2.6.16
noreply at bugs.digium.com
noreply at bugs.digium.com
Sat Sep 8 09:27:11 CDT 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=10314
======================================================================
Reported By: darren1713
Assigned To:
======================================================================
Project: Zaptel
Issue ID: 10314
Category: ztdummy
Reproducibility: always
Severity: feature
Priority: normal
Status: new
Zaptel Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!): 2770
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 07-26-2007 18:36 CDT
Last Modified: 09-08-2007 09:27 CDT
======================================================================
Summary: [patch] Merged in support for high resolution timers
in kernel >=2.6.16
Description:
The new high resolution timer in the kernel generates very accurate
periodic timing. Just using the kernel based timing gets these sorts of
results from ztdummy (99.999992% avg):
......
8192 samples in 8192.000000 sample intervals 100.000000%
8192 samples in 8192.008000 sample intervals 99.999908%
--- Results after 123 passes ---
Best: 100.000000 -- Worst: 99.999512 -- Average: 99.999992
The high resolution timer in ztdummy is only built if it's supported and
enabled in the kernel, and will continue to use the RTC timing if the high
resolution timers are not available.
Specifically, CONFIG_HIGH_RES_TIMERS needs to be enabled (Processor type
and features -> High Resolution Timer Support), and optionally, (Processor
type and features -> HPET Timer Support) provides a better clock source.
There should be no side effects to this, since it's the new kernel
timers.
Adding an option into the "make menuselect" to force RTC instead if they
are both available would be a good addition. Configs/Makefiles are not my
fortay, so this would be better for someone else to do.
======================================================================
----------------------------------------------------------------------
nenadr - 09-08-07 09:27
----------------------------------------------------------------------
I've looked around various kernel sources from kernel.org and i've figured
out that CONFIG_HIGH_RES_TIMERS is added to a kernel tree at kernel.org
starting with 2.6.20 kernel (there are separate patches for 2.6.17 kernel
downloadabe on net, but i didn't found them in 2.6.17 kernels from
kernel.org).
NOTICE that, on the other hand, EXPORT_SYMBOL_GPL(hrtimer_forward) can be
found only in newest 2.6.22 kernels from kernel.org, so compiling this
patch against any other kernel sources from kernel.org (< 2.6.22) is
useless and gives you either ztdummy modules without HRTimers support (<
2.6.20) or unloadable ztdummy complaing to a missing symbol
"hrtimer_forward" (= 2.6.21) !
Someone should update patch to check for those kind of kernel versions
when enableing HRTimers for ztdummy.
I've tried patch with zaptel 1.2.20.1 and kernel 2.6.22.6 from kernel.org
and it is working like charm - it improved zttest for me from: -- Average:
99.975586 to: -- Average: 99.985 on my PCEngines ALIX.1C (AMD LX800
processor) board.
I still didn't managed to test it on a "real machine" :) !
Issue History
Date Modified Username Field Change
======================================================================
09-08-07 09:27 nenadr Note Added: 0070182
======================================================================
More information about the asterisk-bugs
mailing list