From owner-cvs-src@FreeBSD.ORG Tue Feb 7 16:04:04 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A013216A420; Tue, 7 Feb 2006 16:04:04 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74A6843D45; Tue, 7 Feb 2006 16:04:04 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k17G44gl084803; Tue, 7 Feb 2006 16:04:04 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k17G445d084802; Tue, 7 Feb 2006 16:04:04 GMT (envelope-from jhb) Message-Id: <200602071604.k17G445d084802@repoman.freebsd.org> From: John Baldwin Date: Tue, 7 Feb 2006 16:04:04 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_acct.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2006 16:04:04 -0000 jhb 2006-02-07 16:04:04 UTC FreeBSD src repository Modified files: sys/kern kern_acct.c Log: - Add a kthread to periodically call acctwatch() when accounting is active instead of calling acctwatch() from softclock. The acctwatch() function needs to hold an sx lock and also makes a VFS call, and neither of these are good things (or safe) to do from a callout. The kthread only exists and is running when accounting is turned on; it is started and stopped as needed. I didn't run acctwatch() via the thread taskqueue at Robert's request as he was worried that if the accounting file was over NFS the VFS_STAT() calls might stall other work on the taskqueue. - Add an acct_disable() function to take care of closing the accounting vnode and cleaning up so we don't duplicate the same code in two different places. MFC after: 3 days Revision Changes Path 1.79 +128 -28 src/sys/kern/kern_acct.c