From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 27 07:42:30 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 C050EF51; Wed, 27 Nov 2013 07:42:30 +0000 (UTC) Received: from mail-ea0-x236.google.com (mail-ea0-x236.google.com [IPv6:2a00:1450:4013:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 334BA2D40; Wed, 27 Nov 2013 07:42:30 +0000 (UTC) Received: by mail-ea0-f182.google.com with SMTP id o10so5831005eaj.13 for ; Tue, 26 Nov 2013 23:42:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=d5tP0qQqaNSQr/HrruCwptEtvmB6gUek11zU2XojRNo=; b=COUEoIOgS2w+JnYiamWWqiMmeISNeHWRHXzEBqQ786COh1iho3dLUv/GSjmv0F/Y7+ iz4SvdgbRLHr+JUSXyOCMBVjU/k9qWF6omkNGya5ndnsX+pPY4DxDAQBPmXR80mBvwPV +yhtC9K2mqkyRYQlaOyjyyYGz6WxU7koqi+crYFcMkgJcfMH/OwCdqE/0dQWwCHiXHu7 mfVs61ocs893ZTd8hRJ15qBCJ8B9j3J85tyZ28kfhq79xCrI0LI7t4RlCRYJ1VFmsxGo SY/vgFPJa3GqR4/ikNtlRk+fa90WFvGQQJCOhQP1P/PnA2wc5j5rXENl9iuVJ4l7oCMP TVUA== X-Received: by 10.15.36.197 with SMTP id i45mr16064572eev.31.1385538148639; Tue, 26 Nov 2013 23:42:28 -0800 (PST) Received: from mavbook.mavhome.dp.ua ([178.137.150.35]) by mx.google.com with ESMTPSA id a45sm16712012eem.6.2013.11.26.23.42.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Nov 2013 23:42:27 -0800 (PST) Sender: Alexander Motin Message-ID: <5295A261.2060403@FreeBSD.org> Date: Wed, 27 Nov 2013 09:42:25 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd , Bret Ketchum Subject: Re: 9.1 callout behavior References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" 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: Wed, 27 Nov 2013 07:42:30 -0000 Hi, Brett, Could you tell more about "ticks has increased 8x"? Tickless mode it is somewhat tricky algorithm to track global ticks counter, but it should not jump that big. Jumps there could easily trigger wrong callout behavior in 9 (in 10 callout code was rewritten and no longer depend on ticks). On 21.11.2013 22:19, Adrian Chadd wrote: > It sounds like you may have found an interesting test case. > > Mav, any ideas? > > On 21 November 2013 05:20, Bret Ketchum wrote: >> 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 >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Alexander Motin