From owner-freebsd-arch@FreeBSD.ORG Wed May 30 05:12:23 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 66A2816A421 for ; Wed, 30 May 2007 05:12:23 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id F162513C455 for ; Wed, 30 May 2007 05:12:22 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.101] (c-71-231-138-78.hsd1.or.comcast.net [71.231.138.78]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id l4U5CJGK098854 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Wed, 30 May 2007 01:12:21 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Tue, 29 May 2007 22:12:14 -0700 (PDT) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Bruce Evans In-Reply-To: <20070529201255.X661@10.0.0.1> Message-ID: <20070529220936.W661@10.0.0.1> 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Updated rusage patch 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: Wed, 30 May 2007 05:12:23 -0000 I have updated the patch at: http://people.freebsd.org/~jeff/rusage3.diff I have incorporated much of the feedback from the earlier diff. I have also changed the cpulimit code to use a callback. This removes a PS_ flag and a bunch of code from mi_switch() and ast(). mi_switch() now does not need to touch the proc at all unless debugging is enabled. I have tested the cpu limiting code as well and it seems to function properly. My only reservation is the extra overhead of another callout per proc. Thanks, Jeff