From owner-cvs-all@FreeBSD.ORG Sun Aug 31 00:33:44 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A19E16A4C0; Sun, 31 Aug 2003 00:33:44 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27B7843FCB; Sun, 31 Aug 2003 00:33:43 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h7V7Xgv71864; Sun, 31 Aug 2003 03:33:42 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Sun, 31 Aug 2003 03:33:42 -0400 (EDT) From: Jeff Roberson To: Jeff Roberson In-Reply-To: <200308310729.h7V7TYfr015861@repoman.freebsd.org> Message-ID: <20030831033218.Y12093-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/ufs/ffs ffs_softdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2003 07:33:44 -0000 I tested these changes on a machine that was tuned down to 64MB to increase buf churn. I haven't observed any LORs or anything of that nature. It is somewhat tricky though, so if you encounter any problems, feel free to yell. Cheers, Jeff On Sun, 31 Aug 2003, Jeff Roberson wrote: > jeff 2003/08/31 00:29:34 PDT > > FreeBSD src repository > > Modified files: > sys/ufs/ffs ffs_softdep.c > Log: > - Don't acquire the vnode interlock in drain_output(). Instead, require the > caller to acquire it. This permits drain_output() to be done atomically > with other operations as well as reducing the number of lock operations. > - Assert that the proper locks are held in drain_output(). > - Change getdirtybuf() to accept a mutex as an argument. This mutex is used > to protect the vnode's buf list and the BKGRDWAIT flag. This lock is > dropped when we successfully acquire a buffer and held on return > otherwise. These semantics reduce the number of cumbersome cases in > calling code. > - Pass the mtx from getdirtybuf() into interlocked_sleep() and allow this > mutex to be used as the interlock argument to BUF_LOCK() in the LOCKBUF > case of interlocked_sleep(). > - Change the return value of getdirtybuf() to be the resulting locked buffer > or NULL otherwise. This is for callers who pass in a list head that > requires a lock. It is necessary since the lock that protects the list > head must be dropped in getdirtybuf() so that we don't have a lock order > reversal with the buf queues lock in bremfree(). > - Adjust all callers of getdirtybuf() to match the new semantics. > - Add a comment in indir_trunc() that points at unlocked access to a buf. > This may also be one of the last instances of incore() in the tree. > > Revision Changes Path > 1.141 +77 -53 src/sys/ufs/ffs/ffs_softdep.c >