From owner-freebsd-stable@FreeBSD.ORG Tue Jan 22 18:42:23 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9314D9C6; Tue, 22 Jan 2013 18:42:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x22e.google.com (we-in-x022e.1e100.net [IPv6:2a00:1450:400c:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 0CAD4D3E; Tue, 22 Jan 2013 18:42:22 +0000 (UTC) Received: by mail-we0-f174.google.com with SMTP id r6so642052wey.33 for ; Tue, 22 Jan 2013 10:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=m1Qkn8eykiUBFhU0VZsC6t9yfS+yduqe3IIdLXFxKWc=; b=dIH/z9foC5kZxLtdV5srTphsSENOAjwRR2t995kOGH3xObnEdQZl2Qhw2oyerDXmm0 6hUFDM2vVzT6EQX2SltOwE/PEj4U/Obso/GpgZvjyhWmn50dVwNMB9UPoOxtuf7Fjw6F 9nUWVbUNWL30bW2bT9kC+sfDLS2cpISzw9W6O3ZWXC511/vlYz9s7DD7v/xK8lDjLoLn 9EuoFlPt+2k58JcFmJtydSnfnUQohjQswOY53rq5jy4LWrD8MdW46BpHQkWT7OFR/oEq 83RrQmcgD0XX4J0sJ/tRHnPGk73vqtqyURdszkxVw1+4JR8peSPvDeRZO5ra6RGx7TEw I5aw== MIME-Version: 1.0 X-Received: by 10.180.8.130 with SMTP id r2mr23159091wia.28.1358880141992; Tue, 22 Jan 2013 10:42:21 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.123.73 with HTTP; Tue, 22 Jan 2013 10:42:21 -0800 (PST) In-Reply-To: References: <1358780588.32417.414.camel@revolution.hippie.lan> <1358783667.32417.434.camel@revolution.hippie.lan> Date: Tue, 22 Jan 2013 10:42:21 -0800 X-Google-Sender-Auth: bpIMjXtveeKUcLAS9t64oDbvl7Y Message-ID: Subject: Re: time issues and ZFS From: Adrian Chadd To: Daniel Braniss Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-stable@freebsd.org, Ian Lepore X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2013 18:42:23 -0000 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 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 > >