mmtimer resolution question

Jeremy White jwhite at codeweavers.com
Fri Feb 11 13:56:29 CST 2005


Hmm.  Actually, both cases are broken; you should have a min/max
that hovers right around the target period.  This is what I get
on a 2.6.9 kernel:

timer.c:59:wPeriodMin = 1, wPeriodMax = 65535
timer.c:110:period = 1, resolution = 0
timer.c:136:min = 0, max = 2, average = 1.000000
timer.c:110:period = 1, resolution = 1
timer.c:136:min = 0, max = 2, average = 1.000000
fixme:mmtime:timeBeginPeriod Stub; we set our timer resolution at minimum
fixme:mmtime:timeEndPeriod Stub; we set our timer resolution at minimum
timer.c:110:period = 10, resolution = 0
timer.c:136:min = 9, max = 11, average = 10.000000
fixme:mmtime:timeBeginPeriod Stub; we set our timer resolution at minimum
fixme:mmtime:timeEndPeriod Stub; we set our timer resolution at minimum
timer.c:110:period = 10, resolution = 1
timer.c:136:min = 9, max = 11, average = 10.000000
fixme:mmtime:timeBeginPeriod Stub; we set our timer resolution at minimum
fixme:mmtime:timeEndPeriod Stub; we set our timer resolution at minimum
timer.c:110:period = 10, resolution = 10
timer.c:136:min = 9, max = 11, average = 10.000000
fixme:mmtime:timeBeginPeriod Stub; we set our timer resolution at minimum
fixme:mmtime:timeEndPeriod Stub; we set our timer resolution at minimum
timer.c:110:period = 20, resolution = 0
timer.c:136:min = 19, max = 21, average = 20.000000
fixme:mmtime:timeBeginPeriod Stub; we set our timer resolution at minimum
fixme:mmtime:timeEndPeriod Stub; we set our timer resolution at minimum
timer.c:110:period = 20, resolution = 1
timer.c:136:min = 19, max = 21, average = 20.000000
fixme:mmtime:timeBeginPeriod Stub; we set our timer resolution at minimum
fixme:mmtime:timeEndPeriod Stub; we set our timer resolution at minimum
timer.c:110:period = 20, resolution = 10
timer.c:136:min = 19, max = 21, average = 20.000000
fixme:mmtime:timeBeginPeriod Stub; we set our timer resolution at minimum
fixme:mmtime:timeEndPeriod Stub; we set our timer resolution at minimum
timer.c:110:period = 20, resolution = 20
timer.c:136:min = 19, max = 21, average = 20.000000
timer: 40 tests executed, 0 marked as todo, 0 failures.

Now I just went to prove that my tests on 2.4 got the same results,
and I now get results similar to what you report.  I suspect I just
misread them earlier (operator error), and that what we're really
seeing is a difference bewteen the 2.4 and 2.6 kernels.

Cheers,

Jeremy


Robert Reif wrote:
> Jeremy White wrote:
> 
>> Hmm.  When I run it, I see only the expected behavior,
>> both on a 2.4 and 2.6 kernel.
>>
> Here is what I get with an up to date RH9 on a Dell Dimension 8300
> with latest CVS:
> 
> Without ntdll/sync.c patch:
> 
> timer.c:59:wPeriodMin = 1, wPeriodMax = 65535
> timer.c:110:period = 1, resolution = 0
> timer.c:136:min = 0, max = 13, average = 1.000000
> timer.c:110:period = 1, resolution = 1
> timer.c:136:min = 0, max = 2, average = 1.000000
> timer.c:110:period = 10, resolution = 0
> timer.c:136:min = 0, max = 23, average = 9.818182
> timer.c:110:period = 10, resolution = 1
> timer.c:136:min = 0, max = 20, average = 9.818182
> timer.c:110:period = 10, resolution = 10
> timer.c:136:min = 0, max = 24, average = 9.818182
> timer.c:110:period = 20, resolution = 0
> timer.c:136:min = 12, max = 21, average = 19.919192
> timer.c:110:period = 20, resolution = 1
> timer.c:136:min = 12, max = 24, average = 19.919192
> timer.c:110:period = 20, resolution = 10
> timer.c:136:min = 12, max = 21, average = 19.919192
> timer.c:110:period = 20, resolution = 20
> timer.c:136:min = 1, max = 30, average = 19.919192
> timer: 40 tests executed, 0 marked as todo, 0 failures.
> 
> and with patch:
> 
> timer.c:59:wPeriodMin = 1, wPeriodMax = 65535
> timer.c:110:period = 1, resolution = 0
> timer.c:136:min = 0, max = 2, average = 1.000000
> timer.c:110:period = 1, resolution = 1
> timer.c:136:min = 0, max = 2, average = 1.000000
> timer.c:110:period = 10, resolution = 0
> timer.c:136:min = 0, max = 20, average = 9.818182
> timer.c:110:period = 10, resolution = 1
> timer.c:136:min = 0, max = 23, average = 9.818182
> timer.c:110:period = 10, resolution = 10
> timer.c:136:min = 0, max = 24, average = 9.818182
> timer.c:110:period = 20, resolution = 0
> timer.c:136:min = 12, max = 21, average = 19.919192
> timer.c:110:period = 20, resolution = 1
> timer.c:136:min = 12, max = 23, average = 19.919192
> timer.c:110:period = 20, resolution = 10
> timer.c:136:min = 12, max = 22, average = 19.919192
> timer.c:110:period = 20, resolution = 20
> timer.c:136:min = 12, max = 23, average = 19.919192
> timer: 40 tests executed, 0 marked as todo, 0 failures.
> 
> I guess I need to add a standard deviation to the tests.
> 
> 




More information about the wine-devel mailing list