Subject: Re: free space (was /dev) on tmpfs problem
To: None <dan@geek.com.au>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 11/14/2005 19:15:46
> Fixing that problem in tmpfs_subr.c::tmpfs_mem_info() is pretty
> simple, see diff #1. With this diff, my previous example with df's
> and swapctl -a/-d works as I'd expect.
>
> Furthermore, fixing that function to not look like it needs to know
> uvm internals (use only uvmexp.*), do much less work and therefore
> also to kill the concerns behind the XXX comments at the top, is also
> pretty simple, see diff #2.
>
> A slightly different approach would be to use uvmexp.inactive rather
> than uvmexp.filepages. I think I prefer this, actually, though I'd
> like to watch it in action a little longer, it might need something
> slightly different.
some random points:
- not all filepages are reclaimable.
(eg. wired pages, mfs)
- uvmexp.inactive is not appropriate as it includes anonymous pages.
- this kind of calculation should be done in uvm, not tmpfs.
(cf. uvm_reclaimable)
- you seem to misuse uvmexp values in diff #2.
- if you take this route, eventually you need to account buffer cache,
pool idle pages, etc.
YAMAMOTO Takashi