From owner-cvs-src@FreeBSD.ORG Mon Aug 16 07:33:14 2004 Return-Path: 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 ED4F116A4CE; Mon, 16 Aug 2004 07:33:14 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBCCB43D1F; Mon, 16 Aug 2004 07:33:14 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id D08435CAB7; Mon, 16 Aug 2004 00:33:14 -0700 (PDT) Date: Mon, 16 Aug 2004 00:33:14 -0700 From: Alfred Perlstein To: Dag-Erling Smorgrav Message-ID: <20040816073314.GA57908@elvis.mu.org> References: <200408152158.i7FLw2mW016740@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408152158.i7FLw2mW016740@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/pseudofs pseudofs_vncache.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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: Mon, 16 Aug 2004 07:33:15 -0000 * Dag-Erling Smorgrav [040815 14:58] wrote: > des 2004-08-15 21:58:02 UTC > > FreeBSD src repository > > Modified files: > sys/fs/pseudofs pseudofs_vncache.c > Log: > Release the vnode cache mutex when calling vgone(), since vgone() may > sleep. This makes pfs_exit() even less efficient than before, but on > the bright side, the vnode cache mutex no longer needs to be recursive. I would suggest moving them all to a seperate list, then walking that list calling vgone on each node. here's some... psuedo-code! --- pseudofs_vncache.c 15 Aug 2004 21:58:02 -0000 1.26 +++ pseudofs_vncache.c 16 Aug 2004 07:34:51 -0000 @@ -219,9 +219,10 @@ static void pfs_exit(void *arg, struct proc *p) { struct pfs_vdata *pvd, *pvfree; struct vnode *vnp; pvfree = NULL; mtx_lock(&Giant); /* * This is extremely inefficient due to the fact that vgone() not @@ -240,16 +241,14 @@ pvd = pfs_vncache; while (pvd != NULL) { if (pvd->pvd_pid == p->p_pid) { /* REMOVE FROM pfs_vncache */ /* ADD TO pvfree */ } else { pvd = pvd->pvd_next; } } mtx_unlock(&pfs_vncache_mutex); /* while ! end of list pvfree vgone pvfree->v_data */ mtx_unlock(&Giant); } -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684