time issues and ZFS

Adrian Chadd adrian at freebsd.org
Tue Jan 22 18:42:23 UTC 2013


Hi!

As I said before, the problem with non-HLT loops with event-timer in
-9 and -head is that it calls the idle function inside a critical
section (critical_enter and critical_exit) which blocks interrupts
from occuring.

The EI;HLT instruction pair on i386/amd64 atomically and correctly
handles things from what I've been told.

However, there's no atomic way to do this using ACPI sleeping, so
there's a small window where an interrupt may come in but it isn't
handled; waiting for the next interrupt to occur before it'll wake up
and respond to that interrupt.

I kept hitting my head against this when doing network testing. :(

Now - specifically for timekeeping it shouldn't matter; that's to do
with whether the counters are reliable or not (and heck, are even in
lock-step on CPUs.) But extra latency could show up weirdly, hence why
I was asking for you to try different timer configurations and idle
loops.

Thanks,


Adrian

On 22 January 2013 01:55, Daniel Braniss <danny at cs.huji.ac.il> wrote:
>> Daniel,
>>
>> Have you run tests with the machdep.idle value changed, and fiddling
>> kern.eventtimer.periodic / kern.eventtimer.idletick ?
>
> Adrian,
>
> not yet, for several reasons:
> 1- as I explained, I can't realy force the problem, it happens when we run some
> zfs scripts, like mirror, but have to wait till enough changes happened on
> the source, usualy after 24hs.
> 2- changing to LAPIC seems to have solved the problem.
> 3- I'm now learning all I can about event timers and you have not answered some
>    of my questions :-)
>
> danny
>
>


More information about the freebsd-stable mailing list