From owner-cvs-all Wed Aug 25 23:39:47 1999 Delivered-To: cvs-all@freebsd.org Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by hub.freebsd.org (Postfix) with ESMTP id 60A1B1512F; Wed, 25 Aug 1999 23:39:39 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: (from alc@localhost) by cs.rice.edu (8.9.0/8.9.0) id BAA02564; Thu, 26 Aug 1999 01:39:21 -0500 (CDT) Date: Thu, 26 Aug 1999 01:39:21 -0500 From: Alan Cox To: Stephen McKay Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/vm vm_map.h Message-ID: <19990826013921.D27804@cs.rice.edu> References: <199908231808.LAA86314@freefall.freebsd.org> <199908250703.RAA14106@nymph.detir.qld.gov.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5us In-Reply-To: <199908250703.RAA14106@nymph.detir.qld.gov.au>; from Stephen McKay on Wed, Aug 25, 1999 at 05:03:24PM +1000 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Wed, Aug 25, 1999 at 05:03:24PM +1000, Stephen McKay wrote: > On Monday, 23rd August 1999, Alan Cox wrote: > > >alc 1999/08/23 11:08:35 PDT > > > > Modified files: > > sys/vm vm_map.h > > Log: > > struct vm_map: > > The lock structure cannot be the first element of the vm_map > > because this can result in livelock between two or more system > > processes trying to kmem_alloc_wait. > > Wouldn't it have been better to change the lock code to sleep on a field > within the lock structure, rather than the first byte? > Yes and no. :-) Doing as you suggest is a great idea because it could reduce the chance of this same problem happening elsewhere in the kernel. (So, I would welcome a patch that implements it.) On the other hand, this patch fixes the problem at hand and has a near-zero chance of causing any new problems. I don't feel the same way about any changes to lockmgr, and since 3.x-STABLE is subject to the same problem, I wanted to try the simplest patch, that I wouldn't worry about MFC'ing, first. Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message