From owner-freebsd-current@FreeBSD.ORG Sat Dec 4 11:12:13 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E920C106564A; Sat, 4 Dec 2010 11:12:13 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 08D378FC0C; Sat, 4 Dec 2010 11:12:12 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA08188; Sat, 04 Dec 2010 13:12:11 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1POq2F-000583-6H; Sat, 04 Dec 2010 13:12:11 +0200 Message-ID: <4CFA220A.30405@freebsd.org> Date: Sat, 04 Dec 2010 13:12:10 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Jung-uk Kim References: <4CF92852.20705@freebsd.org> <201012031504.02532.jkim@FreeBSD.org> <4CF98192.3050909@freebsd.org> <201012031938.12684.jkim@FreeBSD.org> In-Reply-To: <201012031938.12684.jkim@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: non-invariant tsc and cputicker X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 04 Dec 2010 11:12:14 -0000 on 04/12/2010 02:38 Jung-uk Kim said the following: > If my understanding is correct, your patch uses the dummy timecounter > until a real timecounter is chosen. Perhaps this is one way to look at it. But I look at it differently - the patch makes cpu_ticks refer to tc_cpu_ticks. That is, it make _the_ timecounter be used for cpu ticks. Exact timecounter backend is not important to me. > When a real timecounter is set, > tc_cpu_ticks() changes the frequency naturally. How are you going to > solve this problem? Do we really care about cpu ticks accounting that early in the boot? > What should we do when a user set a new > timecounter hardware via "sysctl kern.timecounter.hardware"? User can expect some instability (*if any*) when he does such a significant system reconfiguration. I put "if any", because I think that tc_cpu_ticks() should handle this. The same way as you don't see time returned by e.g. nanotime() going crazy at that moment. > I don't > think it is any better than current code. Am I missing > something? :-( I think that it is much better. Handling of P-state changes for non-invariant TSC is just incorrect. kern.timecounter.hardware is not going to be changed as frequently as P-states, if ever. -- Andriy Gapon