From owner-freebsd-arch Tue Mar 5 3:27: 1 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 7AE9037B405 for ; Tue, 5 Mar 2002 03:26:54 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA20268; Tue, 5 Mar 2002 22:26:32 +1100 Date: Tue, 5 Mar 2002 22:27:23 +1100 (EST) From: Bruce Evans X-X-Sender: To: Seigo Tanimura Cc: Matthew Dillon , Terry Lambert , Subject: Re: reclaiming v_data of free vnodes In-Reply-To: <200203031242.g23CfIfu059069@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> Message-ID: <20020305214534.S4601-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 3 Mar 2002, Seigo Tanimura wrote: > Attached is the patch to use the zone allocator for in-core inodes. What are the advantages of the zone allocator here? Ordinary malloc() works, or should work, perfectly for ffs inodes because the size of an ffs inode is a power of 2 (256), and inodes are rarely allocated or deallocated so efficiency is unimportant. I believe the only problem with malloc() is that it never frees small allocations. This is not hard to fix. I fixed it in FreeBSD-1. This involved little more than fixing the "Couldfree" stuff so that it is actually useful. (Note that "Couldfree" column in vmstat output doesn't show the number of allocations that could be freed. This is usually obvious, since it is usually larger than the "Free" column for popular sizes after the system has been running for a while. IIRC, it shows the number of missed opportunities to free a page.) > On Tue, 26 Feb 2002 18:23:45 +0900, > Seigo Tanimura said: > > Seigo> AFAIK, all of ffs, ifs and ext2fs utilize struct inode and > Seigo> dinode. They deal with the filesystem-specific data by a union. All of > Seigo> the filesystems should thus be able to share a single zone. The sharing is just a bug in the case of ext2fs, and other file systems (msdosfs, cd9660, ...) are too different to share. Your patch is very large due to namespace pollution. vm_zone_t should be opaque in the same way as "struct malloc_type" so that it can be used in headers without everything having to include and . Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message