From owner-freebsd-stable@FreeBSD.ORG Mon Jan 21 20:09:28 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C0E9827C; Mon, 21 Jan 2013 20:09:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2DBA83; Mon, 21 Jan 2013 20:09:27 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id o1so7501026wic.5 for ; Mon, 21 Jan 2013 12:09:21 -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=wMdGVTFW2dXlId7vrJQNNTB0+f2hCoK6ICTx+Zs1QuE=; b=ph34ZtayO4DiIK+FMTt44qYRRPOxv63yNFePSLOOF0FkBwC9FPh+QHWSxW+FebcrM+ 2N0Jg5G4wbd30rn7yqR3HwzqKATyn0EpaEHidfYYADMTiB5TkR81aLcM4jmmivOMOpgV KhnGEwe7KdLUFQjXnVGGiVx+b1+JNRxmUJo1SO+3l5k6zZ91HP8XD/wCyqJEaDO3L+/M mm9rO5nTcNevNG6AgTb2qXZ1/P3g/OPTP5om14Oh3PuaJ1SCiQrRRZLxutqSJSofDAYe ThY0gf7lsTK00siMuUXvG8EqP1xY2EudZelAW2B0FCuh3rsaCLxB+9u7bTPvHlcNcMRQ iOSA== MIME-Version: 1.0 X-Received: by 10.194.172.197 with SMTP id be5mr17218802wjc.20.1358798961542; Mon, 21 Jan 2013 12:09:21 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.123.73 with HTTP; Mon, 21 Jan 2013 12:09:21 -0800 (PST) In-Reply-To: <1358783667.32417.434.camel@revolution.hippie.lan> References: <1358780588.32417.414.camel@revolution.hippie.lan> <1358783667.32417.434.camel@revolution.hippie.lan> Date: Mon, 21 Jan 2013 12:09:21 -0800 X-Google-Sender-Auth: viwKIb-HA-be5qOQd4LgqrIFIHU Message-ID: Subject: Re: time issues and ZFS From: Adrian Chadd To: Ian Lepore Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-stable@freebsd.org, Ronald Klop 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: Mon, 21 Jan 2013 20:09:28 -0000 I still firmly believe the ACPI event timer code is racy, and what we may be seeing here is the fallout from that. It's very possible that we're missing interrupts here - the new eventtimer code that made it into 9.x puts the halt behind a critical section, with interrupts disabled. The only platforms that correctly implement enable-interrupts-and-halt atomically is the HLT (well, and the don't-sleep-at-all) idle loops on i386/amd64. The default method is to use the ACPI sleep method, which doesn't do atomic interrupt enable / halt. I'm still seeing odd stuff on some of my ACPI-using netbooks when doing net80211/ath development and it all goes away whenever I fondle with the above settings. So, play with kern.eventtimer.periodic, kern.eventtimer.idletick and machdep.idle (try setting machdep.idle to hlt, or something else listed in machdep.idle_available) - please report back what the results are. Adrian On 21 January 2013 07:54, Ian Lepore wrote: > On Mon, 2013-01-21 at 17:35 +0200, Daniel Braniss wrote: >> ... >> > >> > What's the output of sysctl kern.eventtimer? >> >> kern.eventtimer.periodic is 0 >> >> > Does the bad behavior >> > change if you set kern.eventimer.periodic=1? >> > >> >> setting kern.eventtimer.timer=LAPIC >> instead of the default HPET made the missing cpu timers to appear: >> # vmstat -i >> interrupt total rate >> irq3: uart1 1695 0 >> irq4: uart0 5 0 >> irq19: ehci0 3875 0 >> irq20: hpet0 uhci3 5495755 1135 >> irq21: uhci2 ehci1 29 0 >> irq23: atapci0 48 0 >> cpu0:timer 7063 1 >> irq256: bce0 117073 24 >> irq260: mfi0 51083 10 >> irq261: mfi1 3088 0 >> cpu1:timer 484 0 >> cpu14:timer 36 0 >> cpu6:timer 486 0 >> cpu8:timer 38 0 >> cpu5:timer 38 0 >> cpu15:timer 38 0 >> cpu7:timer 32 0 >> cpu12:timer 38 0 >> cpu3:timer 40 0 >> cpu9:timer 36 0 >> cpu10:timer 34 0 >> cpu11:timer 37 0 >> cpu2:timer 33 0 >> cpu13:timer 40 0 >> cpu4:timer 36 0 >> Total 5681160 1173 >> >> is this relevant? > > I'll have to let someone who knows modern x86 hardware better comment on > the relative merits of hpet vs. lapic timers. If it was using hpet in > one-shot mode, and changing it to hpet in periodic mode makes the > problem go away, that might be a clue that there's something wrong in > the hpet eventtimer start or interrupt routines. > > I wonder if a single missed interrupt in one-shot mode would bring an > eventtimer to a halt like that? And if so, then what is it about > manually asking for the date that kicks it into running again? > > -- Ian > > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"