Subject: Re: free space (was /dev) on tmpfs problem
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Daniel Carosone <dan@geek.com.au>
List: tech-kern
Date: 11/15/2005 12:49:35
--UqCbVBp1ux8j3oph
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Tue, Nov 15, 2005 at 10:05:47AM +0900, YAMAMOTO Takashi wrote:
> > The right number is then swpgavail - swpginuse.
>=20
> no. swpgavail - swpgonly.
So, swap pages also in RAM can be reclaimed by UVM and used to back
other pages going out? Ok.=20
Now looks like:
size_t
tmpfs_mem_info(boolean_t total)
{
size_t size;
size =3D 0;
size +=3D uvmexp.swpgavail;
if (!total) {
size -=3D uvmexp.swpgonly;
}
size +=3D uvmexp.free;
size +=3D uvmexp.filepages;
return size;
}
> > As long as that's non-zero,
>=20
> As long as that's larger than TMPFS_PAGES_RESERVED,
Yes, fair point, but that's taken care of by the macro that calls this
function. The two should probably be unified if there are no other
call paths.
--
Dan.
--UqCbVBp1ux8j3oph
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)
iD8DBQFDeT6vEAVxvV4N66cRAmnaAKCwx+hVNqaeZWhERmcE7PFsFTPkawCgvexT
AEUwK2eJRifZsy/OisrKY+M=
=1IyM
-----END PGP SIGNATURE-----
--UqCbVBp1ux8j3oph--