From owner-freebsd-arch@FreeBSD.ORG Thu May 24 13:26:06 2007 Return-Path: X-Original-To: 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 1C38B16A469 for ; Thu, 24 May 2007 13:26:06 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id E3DC713C457 for ; Thu, 24 May 2007 13:26:05 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 31C9A2C2A94; Thu, 24 May 2007 08:08:28 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29BjG3PL4-mK; Thu, 24 May 2007 08:08:20 -0500 (CDT) Received: from [216.63.78.18] (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 5D1762C2A92; Thu, 24 May 2007 08:08:20 -0500 (CDT) Message-ID: <46558E43.8040608@cs.rice.edu> Date: Thu, 24 May 2007 08:08:19 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: attilio@FreeBSD.org References: <20070520155103.K632@10.0.0.1> <20070521113648.F86217@besplex.bde.org> <20070520213132.K632@10.0.0.1> <4651CAB8.8070007@FreeBSD.org> <4651CE2F.8080908@FreeBSD.org> <20070521022847.D679@10.0.0.1> <20070521195811.G56785@delplex.bde.org> <4651FCB5.7070604@FreeBSD.org> <20070521225032.C57233@delplex.bde.org> <20070522162819.N5249@besplex.bde.org> <20070522201336.C87981@besplex.bde.org> <46533CAD.8030104@FreeBSD.org> <4655C67A.9060000@FreeBSD.org> In-Reply-To: <4655C67A.9060000@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: alc@freebsd.org, arch@freebsd.org, Jeff Roberson , Bruce Evans Subject: Re: sched_lock && thread_lock() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 13:26:06 -0000 Attilio Rao wrote: > Attilio Rao wrote: > >> Bruce Evans wrote: >> >>> 4 more translation errors breaking 8 counters altogether (v_vnodepgsin >>> is broken twice): >> >> >> Thanks a lot for the revision, there will be a pending patch in the >> next hour. > > > Hello, > Let me know if this patch is right for you and if you have feedbacks, > comments, etc: > http://users.gufi.org/~rookie/works/patches/schedlock/vmmeter3.diff > > This should fix translation errors Bruce has found and switching the > _SET() method in order to being a simple assignment (as Bruce has > suggested). Let me offer a simple rule of thumb for VMCNT_ADD() vs. PCPU_LAZY_INC(): If the field is NOT under the section labeled "Distribution of page usages." in vmmeter, then PCPU_LAZY_INC() is preferable to VMCNT_ADD() implemented with an atomic op. Alan