From owner-freebsd-current@FreeBSD.ORG Tue Jan 24 22:08:15 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BAA7D16A420; Tue, 24 Jan 2006 22:08:15 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B7E643D62; Tue, 24 Jan 2006 22:08:12 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 6881794 for multiple; Tue, 24 Jan 2006 17:08:01 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k0OM8A41015971; Tue, 24 Jan 2006 17:08:10 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-arch@freebsd.org Date: Tue, 24 Jan 2006 17:09:01 -0500 User-Agent: KMail/1.9.1 References: <23570.1138137045@critter.freebsd.dk> In-Reply-To: <23570.1138137045@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601241709.03450.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1248/Tue Jan 24 05:54:38 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Poul-Henning Kamp , current@freebsd.org Subject: Re: [TEST/REVIEW] CPU accounting patches 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: Tue, 24 Jan 2006 22:08:15 -0000 On Tuesday 24 January 2006 16:10, Poul-Henning Kamp wrote: > Here is a new version of my cpu accounting change patch. > > http://phk.freebsd.dk/patch/cpu_acct_1.patch > > This patch is supposedly harmless (or at least mostly harmless) > and I'd appreciate it getting a solid trashing. The XXX in calcru1() you can remove. The rux you are adding the current time to is a local rusage_ext on the stack. However, your changes probably make it bogus in that the current code assumes it can subtract the start time of another CPU (for a thread running on another CPU) from the current time on this CPU to get the amount of time the other thread has been running on the other CPU since it last updated p->p_rux.rux_runtime. However, with the CPUs having disparate timings this would break as curthread's CPU's notion of now will be unrelated to the other thread's CPU's notion of now. Other than that this patch looks fine to me. FYI, Alpha also has a per-cpu counter (RPCC) that is used for the timecounter on UP Alphas. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org