From owner-freebsd-current@freebsd.org Tue Jan 17 14:06:06 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F672CB4464 for ; Tue, 17 Jan 2017 14:06:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A2D21F0F for ; Tue, 17 Jan 2017 14:06:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8E1F01FE025; Tue, 17 Jan 2017 15:05:48 +0100 (CET) Subject: Re: TSC as timecounter makes system lag To: Jia-Shiun Li , Konstantin Belousov References: <20170113120534.GC2349@kib.kiev.ua> <20170115202008.GL2349@kib.kiev.ua> <20170116120021.GQ2349@kib.kiev.ua> Cc: freebsd-current From: Hans Petter Selasky Message-ID: <5f814a7a-5e46-057e-62ad-dde0a61bc1c8@selasky.org> Date: Tue, 17 Jan 2017 15:05:30 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------3184C88B78335154B7680934" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 14:06:06 -0000 This is a multi-part message in MIME format. --------------3184C88B78335154B7680934 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 01/16/17 15:34, Jia-Shiun Li wrote: > Yes. I noticed this because systat refreshes looked slower, > and keystroke did not repeat smoothly for 30/s. I've seen something similar. Does the attached patch make any difference? Can you dump: vmstat -i Just after boot w/ and w/o the attached patch, when the keystroke did not repeat smoothly. --HPS --------------3184C88B78335154B7680934 Content-Type: text/x-patch; name="timer_init_fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="timer_init_fix.diff" diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c index 7f7769d..454a130 100644 --- a/sys/kern/kern_clocksource.c +++ b/sys/kern/kern_clocksource.c @@ -511,7 +511,7 @@ configtimer(int start) state->nexthard = next; state->nextstat = next; state->nextprof = next; - state->nextcall = next; + state->nextcall = SBT_MAX; state->nextcallopt = next; hardclock_sync(cpu); } --------------3184C88B78335154B7680934--