From owner-freebsd-arch Mon Jan 22 19:47:18 2001 Delivered-To: freebsd-arch@freebsd.org Received: from pike.osd.bsdi.com (unknown [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 6FC3D37B400 for ; Mon, 22 Jan 2001 19:45:57 -0800 (PST) Received: from foo.osd.bsdi.com (root@foo.osd.bsdi.com [204.216.28.137]) by pike.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f0N3jsx38108; Mon, 22 Jan 2001 19:45:54 -0800 (PST) (envelope-from jhb@foo.osd.bsdi.com) Received: (from jhb@localhost) by foo.osd.bsdi.com (8.11.1/8.11.1) id f0N3iSv14429; Mon, 22 Jan 2001 19:44:28 -0800 (PST) (envelope-from jhb) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 22 Jan 2001 19:44:28 -0800 (PST) Organization: BSD, Inc. From: John Baldwin To: Bruce Evans Subject: Re: Second zone allocator patch Cc: arch@FreeBSD.ORG, Dag-Erling Smorgrav Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 22-Jan-01 Bruce Evans wrote: >> http://people.freebsd.org/~des/software/vm_zone-20010122.diff >> >> This replaces the simplelock in vm_zone with a mutex, and adds a >> subsystem mutex that must be held when manipulating zlist (which is >> now an SLIST). > > The simplelock was a spinlock, so changing it to a lock that can sleep > changes the semantics. This seems to be a bug in the ZONE_INTERRUPT > case -- note how the ZONE_INTERRUPT case of _zget() avoids locking > stuff while the !ZONE_INTERRUPT case uses it. Blocking on a mutex is allowed in an interrupt context, just sleeping via a cv, or tsleep/msleep is prohibited, so using a normal mutex should be fine here. Note that it should still not call malloc() to avoid sleeping in the ZONE_INTERRUPT case, however, it should lock in all cases. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message