From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 21 13:20:59 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24C93A9E for ; Thu, 21 Nov 2013 13:20:59 +0000 (UTC) Received: from mail-pd0-x22d.google.com (mail-pd0-x22d.google.com [IPv6:2607:f8b0:400e:c02::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 040FF2732 for ; Thu, 21 Nov 2013 13:20:58 +0000 (UTC) Received: by mail-pd0-f173.google.com with SMTP id p10so3479531pdj.4 for ; Thu, 21 Nov 2013 05:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=pz2rtkKRO8mN68MDPxdGRx02eJlbiE8MKW4/uRr1IgA=; b=EBR/3IVyC7741eAvTJfcejU7UGbxpyjp9tqw1Q2dEVJExRHfXChf4V4LZyrE0n/VR5 h+1baJ3lOsxhV7ZF1dNXU9UoK4RI470IiI4Zly0A4A66Jr1qu2bTMhkL7dNl9k6jNMdg Zv5ahILqWJFPgXje24nAo+HMdjajIsIwlXHLH97MJV90Zp5z9s7/6NcDOl1SrEssS/QQ /aRfjN7F18ei9gRNXxZblU655g37vV/mrTC+7lp4kWKeMWbqGquh788R3Vu065D076Hr Odl37LJUG5VTB9K3iyJ/Z3eSVT8sOe4t2jRHD7efHt05fwnGnein9UN+/zWlT1ncwnuE FqFA== MIME-Version: 1.0 X-Received: by 10.68.218.3 with SMTP id pc3mr6245928pbc.71.1385040056398; Thu, 21 Nov 2013 05:20:56 -0800 (PST) Received: by 10.70.41.133 with HTTP; Thu, 21 Nov 2013 05:20:56 -0800 (PST) Date: Thu, 21 Nov 2013 07:20:56 -0600 Message-ID: Subject: 9.1 callout behavior From: Bret Ketchum To: freebsd-hackers@freebsd.org X-Mailman-Approved-At: Thu, 21 Nov 2013 13:27:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2013 13:20:59 -0000 I've a callout which runs every 100ms and does a bit of accounting using the global ticks variable. This one-shot callout was called fairly consistently in 8.1, every 100ms give or take a few thousand clocks. I've recently upgraded to 9.1 and for the most part the period is consistent. However, periodically the callout function is executed anywhere between 5ms to 20ms after the callout was reset and the function returned while global ticks has increased 8x. The hardware has not changed (using the same timecounter configuration): CPU: Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz (2500.05-MHz K8-class CPU) kern.timecounter.hardware: TSC-low kern.timecounter.tick: 1 kern.timecounter.invariant_tsc: 1 kern.timecounter.smp_tsc: 1 And default eventtimer configuration: kern.eventtimer.singlemul: 2 kern.eventtimer.idletick: 0 kern.eventtimer.activetick: 1 kern.eventtimer.timer: LAPIC kern.eventtimer.periodic: 0 If tickless mode is disabled the inconsistency goes away. Is the premature expiration of the callout expected? Is the jump in global ticks typical (say from 100 ticks to 800 ticks in 1.5ms)? Bret