Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2002 22:27:23 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, Terry Lambert <tlambert2@mindspring.com>, <arch@FreeBSD.ORG>
Subject:   Re: reclaiming v_data of free vnodes
Message-ID:  <20020305214534.S4601-100000@gamplex.bde.org>
In-Reply-To: <200203031242.g23CfIfu059069@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <tanimura@r.dl.itc.u-tokyo.ac.jp> 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 <vm/vm.h> and
<vm/vm_zone.h>.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020305214534.S4601-100000>