From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 22:15:10 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4222E06; Thu, 2 Oct 2014 22:15:10 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75DCCAB5; Thu, 2 Oct 2014 22:15:09 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XZoeR-0004W8-SO; Thu, 02 Oct 2014 22:15:08 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s92MF634020039; Thu, 2 Oct 2014 16:15:06 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX192pQr6xDvLmqfkPHo4BYGb X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: freebsd 10 kqueue timer regression From: Ian Lepore To: John Baldwin In-Reply-To: <201410021600.17740.jhb@freebsd.org> References: <8ABC0977-FB8F-45E7-ACCC-BFA92EE22E1C@glccom.com> <1412279608.12052.24.camel@revolution.hippie.lan> <201410021600.17740.jhb@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 02 Oct 2014 16:15:06 -0600 Message-ID: <1412288106.12052.39.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Adrian Chadd , Paul Albrecht X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 22:15:10 -0000 On Thu, 2014-10-02 at 16:00 -0400, John Baldwin wrote: > On Thursday, October 02, 2014 3:53:28 pm Ian Lepore wrote: > > On Thu, 2014-10-02 at 12:47 -0700, Adrian Chadd wrote: > > > I'm confused; it's doing 50 loops of a 20msec timer, right? So that's > 1000ms. > > > > Yes, so the entire loop should take 1000ms maybe + 1ms. Instead it > > takes 1070. When I run it on an armv6 system running -current it takes > > 1050. When I run it on my 8.4 desktop (pre-eventtimers) it takes 1013. > > > > -- Ian > > What if you set kern.eventtimer.periodic=1? > Some interesting results... HZ 100 500 1000 --------------------------------- periodic=0 1050 1050 1080 periodic=1 1110 1012 1049 The 1080 number was +/- 3ms, all the other numbers were +/- 1ms (except for one outlier of 24363 at 100Hz non-periodic which I'm going to pretend didn't happen). The 1050 numbers are probably each 20ms sleep actually taking 21ms, but the old tvtohz code with -1 adjustments from the old email thread isn't in play anymore. I don't know how to account for the other numbers at all. There's all kinds of stuff I don't understand in the new code involving tick thresholds and such. -- Ian