From owner-freebsd-arch@FreeBSD.ORG Tue Jun 5 09:59:31 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BC4A16A41F for ; Tue, 5 Jun 2007 09:59:31 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.180]) by mx1.freebsd.org (Postfix) with ESMTP id BDBB213C46A for ; Tue, 5 Jun 2007 09:59:30 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by ik-out-1112.google.com with SMTP id c21so1121824ika for ; Tue, 05 Jun 2007 02:59:29 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=OAetP5kzXlL7T+LNEF5tuLXn/thMkOLP+qJqeNoE9Vr/5tcFhmOvuPeeCok6O/dOo4sqL9jiYjhG6/s/Aj1huPsA4g4KM1XwJ0WIS+BIXIfvyVJZ2mt6BNTo6oGGyhflzFNIeOkAKPJOyFEzshrK9ufZk9y3s5iztiG6bUsTgxU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=jXCZkmYKs13laTGM7KK5UutsZCj+tEwguuEku+HkiPb5E0/9t8vG8TF2rRzP2gyBCLT1RYUSrqKxu+EpOAETuqKs9qwVoXNdLXdfyTTXkU2rWgH13ZuPHUHBKGQ6P/q0Pde+a//788nmFaleUzCeEb6S8uH1gEt/FT/WgxKADmA= Received: by 10.78.147.6 with SMTP id u6mr2338456hud.1181035814525; Tue, 05 Jun 2007 02:30:14 -0700 (PDT) Received: from ?172.31.5.25? ( [89.97.252.178]) by mx.google.com with ESMTP id 2sm991943nfv.2007.06.05.02.30.13; Tue, 05 Jun 2007 02:30:14 -0700 (PDT) Message-ID: <46652D17.5090903@FreeBSD.org> Date: Tue, 05 Jun 2007 11:29:59 +0200 From: Attilio Rao User-Agent: Thunderbird 1.5 (X11/20060526) MIME-Version: 1.0 To: Bruce Evans References: <20070529105856.L661@10.0.0.1> <200705291456.38515.jhb@freebsd.org> <20070529121653.P661@10.0.0.1> <20070530065423.H93410@delplex.bde.org> <20070529141342.D661@10.0.0.1> <20070530125553.G12128@besplex.bde.org> <20070529201255.X661@10.0.0.1> <20070529220936.W661@10.0.0.1> <20070530201618.T13220@besplex.bde.org> <20070530115752.F661@10.0.0.1> <20070531091419.S826@besplex.bde.org> <20070531010631.N661@10.0.0.1> <20070601154833.O4207@besplex.bde.org> <20070601014601.I799@10.0.0.1> <20070601200348.G6201@delplex.bde.org> <20070601123530.B606@10.0.0.1> <20070604160036.N1084@besplex.bde.org> In-Reply-To: <20070604160036.N1084@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Attilio Rao Cc: freebsd-arch@FreeBSD.org Subject: Re: Updated rusage patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2007 09:59:31 -0000 Bruce Evans wrote: > On Fri, 1 Jun 2007, Jeff Roberson wrote: > >> Please grep for statclock in threadlock.diff. This removes time_lock >> from statclock all together and protects the whole thing with >> thread_lock(). With this change all cpus can execute statclock() >> concurrently with sched_smp.c. This patch also has fixes for locking >> ruxagg() as well as asserts. It does not yet protect the ru copying >> in exit(). I want to figure out the synchronization issues with wait >> first. > > I don't want to get involved reviewing another large[r] patch. > > A bug turned up with the previously committed patches: the swapper > process is now shown as having a runtime of 40-47 seconds after > booting (and never changes after that), but I don't use swapping and > this process has always been shown as having a runtime of 0 seconds > before. > > The bug seems to be that proc0_post() doesn't know anything about the > rusage fields in the thread struct. Until recently, it was only missing > initialization of td_*ticks. Now it is missing initialization of > td_runtime too, so the bug is more obvious. Yes, I always wondered why proc0_post() doesn't initialize [s,i,u]ticks too. However, could you please give a look and a try to this patch: http://users.gufi.org/~rookie/works/patches/schedlock/proc_post.diff and see if it solves your problem. Thanks, Attilio